svn commit: r193336 - head/sys/net
Sam Leffler
sam at FreeBSD.org
Tue Jun 2 18:53:22 UTC 2009
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
More information about the svn-src-all
mailing list