unionfs_lock(): eliminate LK_CANRECURSE special-case

As of commit 9f5c4ef328 ("dounmount(9): temporarily enable recursion
for the covered vnode lock"), the unmount path handles recursion
automatically, so there's no longer a need to handle this case
in unionfs-specific code.

Reviewed by:	kib, markj
Tested by:	pho
Differential Revision:	https://reviews.freebsd.org/D58858
This commit is contained in:
Jason A. Harmening committed 2026-08-21 20:32:15 -05:00
1 parent d7033e3b20
commit b952606b4f
1 file changed
-11
-11
View File
@@ -2252,17 +2252,6 @@ unionfs_lock_restart:
lvp_locked = true;
}
/*
* During unmount, the root vnode lock may be taken recursively,
* because it may share the same v_vnlock field as the vnode covered by
* the unionfs mount. The covered vnode is locked across VFS_UNMOUNT(),
* and the same lock may be taken recursively here during vflush()
* issued by unionfs_unmount().
*/
if ((flags & LK_TYPE_MASK) == LK_EXCLUSIVE &&
(vp->v_vflag & VV_ROOT) != 0)
flags |= LK_CANRECURSE;
vholdnz(tvp);
VI_UNLOCK(vp);
error = VOP_LOCK(tvp, flags);