[Midnightbsd-cvs] src [8994] trunk/sys/net/route.c: write lock is not required for find and compare.
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Thu Sep 29 21:31:09 EDT 2016
Revision: 8994
http://svnweb.midnightbsd.org/src/?rev=8994
Author: laffer1
Date: 2016-09-29 21:31:09 -0400 (Thu, 29 Sep 2016)
Log Message:
-----------
write lock is not required for find and compare.
Modified Paths:
--------------
trunk/sys/net/route.c
Modified: trunk/sys/net/route.c
===================================================================
--- trunk/sys/net/route.c 2016-09-30 01:30:15 UTC (rev 8993)
+++ trunk/sys/net/route.c 2016-09-30 01:31:09 UTC (rev 8994)
@@ -27,7 +27,7 @@
* SUCH DAMAGE.
*
* @(#)route.c 8.3.1.1 (Berkeley) 2/23/95
- * $MidnightBSD: src/sys/net/route.c,v 1.7 2013/01/17 23:29:37 laffer1 Exp $
+ * $MidnightBSD$
*/
/************************************************************************
* Note: In this file a 'fib' is a "forwarding information base" *
@@ -1495,7 +1495,7 @@
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)) {
@@ -1524,7 +1524,7 @@
(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 Midnightbsd-cvs
mailing list