svn commit: r274590 - projects/routing/sys/net

Alexander V. Chernikov melifaro at FreeBSD.org
Sun Nov 16 18:44:47 UTC 2014


Author: melifaro
Date: Sun Nov 16 18:44:46 2014
New Revision: 274590
URL: https://svnweb.freebsd.org/changeset/base/274590

Log:
  Finish r274335:
  * put RT_LOCK_DESTROY() back
  * remove unused RT_UNLOCK_COND macro

Modified:
  projects/routing/sys/net/route.c
  projects/routing/sys/net/route_internal.h

Modified: projects/routing/sys/net/route.c
==============================================================================
--- projects/routing/sys/net/route.c	Sun Nov 16 18:15:23 2014	(r274589)
+++ projects/routing/sys/net/route.c	Sun Nov 16 18:44:46 2014	(r274590)
@@ -496,6 +496,7 @@ rtfree(struct rtentry *rt)
 		/*
 		 * and the rtentry itself of course
 		 */
+		RT_LOCK_DESTROY(rt);
 		uma_zfree(V_rtzone, rt);
 		return;
 	}

Modified: projects/routing/sys/net/route_internal.h
==============================================================================
--- projects/routing/sys/net/route_internal.h	Sun Nov 16 18:15:23 2014	(r274589)
+++ projects/routing/sys/net/route_internal.h	Sun Nov 16 18:44:46 2014	(r274590)
@@ -91,10 +91,6 @@ struct rtentry {
 #define	RT_UNLOCK(_rt)		mtx_unlock(&(_rt)->rt_mtx)
 #define	RT_LOCK_DESTROY(_rt)	mtx_destroy(&(_rt)->rt_mtx)
 #define	RT_LOCK_ASSERT(_rt)	mtx_assert(&(_rt)->rt_mtx, MA_OWNED)
-#define	RT_UNLOCK_COND(_rt)	do {				\
-	if (mtx_owned(&(_rt)->rt_mtx))				\
-		mtx_unlock(&(_rt)->rt_mtx);			\
-} while (0)
 
 #define	RT_ADDREF(_rt)	do {					\
 	RT_LOCK_ASSERT(_rt);					\


More information about the svn-src-projects mailing list