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
This commit is contained in:
sam 2009-06-02 18:53:21 +00:00
parent 14f4a9dd42
commit ba34647600

View File

@ -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, int vmove)
}
ifp->if_afdata_initialized = 0;
IF_AFDATA_UNLOCK(ifp);
if (!vmove)
ifq_detach(&ifp->if_snd);
}
#ifdef VIMAGE