Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 2 Jun 2009 18:53:22 +0000 (UTC)
From:      Sam Leffler <sam@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r193336 - head/sys/net
Message-ID:  <200906021853.n52IrMsU025146@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: sam
Date: Tue Jun  2 18:53:21 2009
New Revision: 193336
URL: http://svn.freebsd.org/changeset/base/193336

Log:
  move ifq_detach from if_detach to if_free; this permits callers to
  reference if_snd in the period between detach+free which helps simplify
  detach code
  
  Reviewed by:	jhb, rwatson

Modified:
  head/sys/net/if.c

Modified: head/sys/net/if.c
==============================================================================
--- head/sys/net/if.c	Tue Jun  2 18:53:21 2009	(r193335)
+++ head/sys/net/if.c	Tue Jun  2 18:53:21 2009	(r193336)
@@ -574,6 +574,7 @@ if_free_internal(struct ifnet *ifp)
 	knlist_destroy(&ifp->if_klist);
 	IF_AFDATA_DESTROY(ifp);
 	IF_ADDR_LOCK_DESTROY(ifp);
+	ifq_detach(&ifp->if_snd);
 	free(ifp, M_IFNET);
 }
 
@@ -1025,9 +1026,6 @@ if_detach_internal(struct ifnet *ifp, in
 	}
 	ifp->if_afdata_initialized = 0;
 	IF_AFDATA_UNLOCK(ifp);
-
-	if (!vmove)
-		ifq_detach(&ifp->if_snd);
 }
 
 #ifdef VIMAGE



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906021853.n52IrMsU025146>