svn commit: r195032 - user/kmacy/releng_7_2_fcs/sys/net
Kip Macy
kmacy at FreeBSD.org
Fri Jun 26 02:27:58 UTC 2009
Author: kmacy
Date: Fri Jun 26 02:27:57 2009
New Revision: 195032
URL: http://svn.freebsd.org/changeset/base/195032
Log:
allow for losing a race with RT_REMREF
Modified:
user/kmacy/releng_7_2_fcs/sys/net/route.c
Modified: user/kmacy/releng_7_2_fcs/sys/net/route.c
==============================================================================
--- user/kmacy/releng_7_2_fcs/sys/net/route.c Fri Jun 26 01:42:41 2009 (r195031)
+++ user/kmacy/releng_7_2_fcs/sys/net/route.c Fri Jun 26 02:27:57 2009 (r195032)
@@ -348,8 +348,7 @@ rtfree(struct rtentry *rt)
* The callers should use RTFREE_LOCKED() or RTFREE(), so
* we should come here exactly with the last reference.
*/
- RT_REMREF(rt);
- if (rt->rt_refcnt > 0) {
+ if (rt->rt_refcnt > 1) {
log(LOG_DEBUG, "%s: %p has %d refs\n", __func__, rt, rt->rt_refcnt);
goto done;
}
@@ -363,7 +362,7 @@ rtfree(struct rtentry *rt)
* typically calls rtexpunge which clears the RTF_UP flag
* on the entry so that the code below reclaims the storage.
*/
- if (rt->rt_refcnt == 0 && rnh->rnh_close)
+ if (rt->rt_refcnt == 1 && rnh->rnh_close)
rnh->rnh_close((struct radix_node *)rt, rnh);
/*
More information about the svn-src-user
mailing list