svn commit: r248546 - stable/9/sys/net

Alexander V. Chernikov melifaro at FreeBSD.org
Wed Mar 20 07:20:00 UTC 2013


Author: melifaro
Date: Wed Mar 20 07:20:00 2013
New Revision: 248546
URL: http://svnweb.freebsd.org/changeset/base/248546

Log:
  Merge r247842.
  
  Write lock is not required for find&compare operation.

Modified:
  stable/9/sys/net/route.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/net/   (props changed)

Modified: stable/9/sys/net/route.c
==============================================================================
--- stable/9/sys/net/route.c	Wed Mar 20 06:35:03 2013	(r248545)
+++ stable/9/sys/net/route.c	Wed Mar 20 07:20:00 2013	(r248546)
@@ -1503,7 +1503,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)) {
 
@@ -1532,7 +1532,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