diff options
| author | Jason A. Harmening <jah@FreeBSD.org> | 2022-10-26 22:25:20 +0000 |
|---|---|---|
| committer | Jason A. Harmening <jah@FreeBSD.org> | 2022-12-11 04:02:38 +0000 |
| commit | 42442d7a6eeb860e00f76aae5858884b44f6cce5 (patch) | |
| tree | 8d7d0f9197e16d485bf73666da2e453b57ba7920 /lib/libvmmapi | |
| parent | bc2ccf0e4f8f655c00ab5cb344bdff0ee9546060 (diff) | |
Generalize the VV_CROSSLOCK logic in vfs_lookup()
When VV_CROSSLOCK is present, the lock for the vnode at the current
stage of lookup must be held across the VFS_ROOT() call for the
filesystem mounted at the vnode. Since VV_CROSSLOCK implies that
the root vnode reuses the already-held lock, the possibility for
recursion should be made clear in the flags passed to VFS_ROOT().
For cases in which the lock is held exclusive, this means passing
LK_CANRECURSE. For cases in which the lock is held shared, it
means clearing LK_NODDLKTREAT to allow VFS_ROOT() to potentially
recurse on the shared lock even in the presence of an exclusive
waiter.
That the existing code works for unionfs is due to a coincidence
of the current unionfs implementation.
Reviewed by: kib
Tested by: pho
Differential Revision: https://reviews.freebsd.org/D37458
Diffstat (limited to 'lib/libvmmapi')
0 files changed, 0 insertions, 0 deletions
