diff options
author | melifaro <melifaro@FreeBSD.org> | 2013-03-05 13:38:45 +0000 |
---|---|---|
committer | melifaro <melifaro@FreeBSD.org> | 2013-03-05 13:38:45 +0000 |
commit | 2a77ba41037feab4e87b648711efe412e30e411c (patch) | |
tree | c944347caa4fa3af2d48e97fb900fe13a3e78296 | |
parent | 94bcfee7d03e5cb5f1dcc2ad73cea265c42f8dcc (diff) | |
download | FreeBSD-src-2a77ba41037feab4e87b648711efe412e30e411c.zip FreeBSD-src-2a77ba41037feab4e87b648711efe412e30e411c.tar.gz |
Write lock is not required for find&compare operation.
MFC after: 2 weeks
-rw-r--r-- | sys/net/route.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net/route.c b/sys/net/route.c index e69ce48..c0f6526 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; |