FreeBSD: stop passing LK_INTERLOCK to VOP_LOCK
There is an ongoing effort to eliminate this feature. Reviewed-by: Alexander Motin <mav@FreeBSD.org> Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Signed-off-by: Mateusz Guzik <mjguzik@gmail.com> Closes #13908
This commit is contained in:
parent
55816c64da
commit
2c8e3e4b28
|
@ -976,12 +976,13 @@ zfsctl_snapdir_lookup(struct vop_lookup_args *ap)
|
||||||
*/
|
*/
|
||||||
VI_LOCK(*vpp);
|
VI_LOCK(*vpp);
|
||||||
if (((*vpp)->v_iflag & VI_MOUNT) == 0) {
|
if (((*vpp)->v_iflag & VI_MOUNT) == 0) {
|
||||||
|
VI_UNLOCK(*vpp);
|
||||||
/*
|
/*
|
||||||
* Upgrade to exclusive lock in order to:
|
* Upgrade to exclusive lock in order to:
|
||||||
* - avoid race conditions
|
* - avoid race conditions
|
||||||
* - satisfy the contract of mount_snapshot()
|
* - satisfy the contract of mount_snapshot()
|
||||||
*/
|
*/
|
||||||
err = VOP_LOCK(*vpp, LK_TRYUPGRADE | LK_INTERLOCK);
|
err = VOP_LOCK(*vpp, LK_TRYUPGRADE);
|
||||||
if (err == 0)
|
if (err == 0)
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue