git: b952606b4f99 - main - unionfs_lock(): eliminate LK_CANRECURSE special-case
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 22 Aug 2026 01:32:32 UTC
The branch main has been updated by jah:
URL: https://cgit.FreeBSD.org/src/commit/?id=b952606b4f999d2e691a1adf02f0ef0b2b34d26c
commit b952606b4f999d2e691a1adf02f0ef0b2b34d26c
Author: Jason A. Harmening <jah@FreeBSD.org>
AuthorDate: 2026-08-15 16:05:46 +0000
Commit: Jason A. Harmening <jah@FreeBSD.org>
CommitDate: 2026-08-22 01:32:15 +0000
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
---
sys/fs/unionfs/union_vnops.c | 11 -----------
1 file changed, 11 deletions(-)
diff --git a/sys/fs/unionfs/union_vnops.c b/sys/fs/unionfs/union_vnops.c
index cfa0f4ab768e..998ca5ea7889 100644
--- a/sys/fs/unionfs/union_vnops.c
+++ b/sys/fs/unionfs/union_vnops.c
@@ -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);