diff options
author | bz <bz@FreeBSD.org> | 2016-05-28 08:32:15 +0000 |
---|---|---|
committer | bz <bz@FreeBSD.org> | 2016-05-28 08:32:15 +0000 |
commit | fbe84e555ec89968a32109225d6f5992cca3b5a4 (patch) | |
tree | 2898693060de4e9e3613029ff1f1c3195871105c /sys/net | |
parent | c5633e4cd9a7db5f6c4b3a843d17049e256a9b5c (diff) | |
download | FreeBSD-src-fbe84e555ec89968a32109225d6f5992cca3b5a4.zip FreeBSD-src-fbe84e555ec89968a32109225d6f5992cca3b5a4.tar.gz |
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
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/if.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/net/if.c b/sys/net/if.c index c989007..6845bbf 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -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", |