In if_attachdomain1() there does not seem to be any reason
to use TRYLOCK rather than just acquire the lock, so just do that. Reviewed by: markj Obtained from: projects/vnet MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D6578
This commit is contained in:
parent
38c4fdf4c6
commit
c169d9fe07
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=300901
@ -821,8 +821,7 @@ if_attachdomain1(struct ifnet *ifp)
|
||||
* Since dp->dom_ifattach calls malloc() with M_WAITOK, we
|
||||
* cannot lock ifp->if_afdata initialization, entirely.
|
||||
*/
|
||||
if (IF_AFDATA_TRYLOCK(ifp) == 0)
|
||||
return;
|
||||
IF_AFDATA_LOCK(ifp);
|
||||
if (ifp->if_afdata_initialized >= domain_init_status) {
|
||||
IF_AFDATA_UNLOCK(ifp);
|
||||
log(LOG_WARNING, "%s called more than once on %s\n",
|
||||
|
Loading…
Reference in New Issue
Block a user