svn commit: r247842 - head/sys/net

Alexander V. Chernikov melifaro at FreeBSD.org
Tue Mar 5 13:38:46 UTC 2013


Author: melifaro
Date: Tue Mar  5 13:38:45 2013
New Revision: 247842
URL: http://svnweb.freebsd.org/changeset/base/247842

Log:
  Write lock is not required for find&compare operation.
  
  MFC after:	2 weeks

Modified:
  head/sys/net/route.c

Modified: head/sys/net/route.c
==============================================================================
--- head/sys/net/route.c	Tue Mar  5 13:31:06 2013	(r247841)
+++ head/sys/net/route.c	Tue Mar  5 13:38:45 2013	(r247842)
@@ -1498,7 +1498,7 @@ rtinit1(struct ifaddr *ifa, int cmd, int
 			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
 			    (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;


More information about the svn-src-all mailing list