From 14126522cfe6e70488d80a1185e31777bc38f4a0 Mon Sep 17 00:00:00 2001 From: "Alexander V. Chernikov" Date: Tue, 5 Mar 2013 13:38:45 +0000 Subject: [PATCH] Write lock is not required for find&compare operation. MFC after: 2 weeks --- sys/net/route.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/net/route.c b/sys/net/route.c index e69ce48bee9e..c0f6526fe805 100644 --- a/sys/net/route.c +++ b/sys/net/route.c @@ -1498,7 +1498,7 @@ rtinit1(struct ifaddr *ifa, int cmd, int flags, int fibnum) if (rnh == NULL) /* this table doesn't exist but others might */ continue; - RADIX_NODE_HEAD_LOCK(rnh); + RADIX_NODE_HEAD_RLOCK(rnh); #ifdef RADIX_MPATH if (rn_mpath_capable(rnh)) { @@ -1527,7 +1527,7 @@ rtinit1(struct ifaddr *ifa, int cmd, int flags, int fibnum) (rn->rn_flags & RNF_ROOT) || RNTORT(rn)->rt_ifa != ifa || !sa_equal((struct sockaddr *)rn->rn_key, dst)); - RADIX_NODE_HEAD_UNLOCK(rnh); + RADIX_NODE_HEAD_RUNLOCK(rnh); if (error) { /* this is only an error if bad on ALL tables */ continue;