mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 00:32:25 -04:00
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
1 changed files with 1 additions and 2 deletions
|
|
@ -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 a new issue