Date: Fri, 26 Jun 2009 02:27:58 +0000 (UTC) From: Kip Macy <kmacy@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r195032 - user/kmacy/releng_7_2_fcs/sys/net Message-ID: <200906260227.n5Q2Rw5J071871@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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); /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906260227.n5Q2Rw5J071871>