HomeFreeBSD

VOP_CLOSE(): MNTK_EXTENDED_SHARED filesystems do not need excl lock

Description

VOP_CLOSE(): MNTK_EXTENDED_SHARED filesystems do not need excl lock

All in-tree implementations of VOP_CLOSE() for filesystems proclaiming
MNTK_EXTENDED_SHARED, are fine with the shared lock for the closed
vnode. I checked the following implementations:
ffs
ext2
ufs
null
tmpfs
devfs
fdescfs
cd9660
zfs
It seems that initial addition of FWRITE check was due to necessity of
handling the VV_TEXT vnode vflag. Since VOP_ADD_WRITECOUNT() only
requires shared lock, we can relax the locking requirement there.

Reviewed by: markj, Olivier Certner <olce.freebsd@certner.fr>
Tested by: Olivier Certner
Sponsored by: The FreeBSD Foundation
Differential revision: https://reviews.freebsd.org/D39784

Details

Provenance
kibAuthored on Apr 24 2023, 10:43 PM
Reviewer
markj
Differential Revision
D39784: VOP_CLOSE(): MNTK_EXTENDED_SHARED filesystems do not need excl lock
Parents
rGf2e75b967ad2: tcp_hpts: add missing "inline"
Branches
Unknown
Tags
Unknown