HomeFreeBSD

VFS: update VOP_FSYNC() debug check to reflect actual locking policy

Description

VFS: update VOP_FSYNC() debug check to reflect actual locking policy

Shared vs. exclusive locking is determined not by MNT_EXTENDED_SHARED
but by MNT_SHARED_WRITES (although there are several places that
ignore this and simply always use an exclusive lock). Also add a
comment on the possible difference between VOP_GETWRITEMOUNT(vp)
and vp->v_mount on this path.

Found by local testing of unionfs atop ZFS with DEBUG_VFS_LOCKS.

Reviewed by: kib, olce
Differential Revision: https://reviews.freebsd.org/D43816

(cherry picked from commit 9530182e371dee382b76d8594f65633a304b396f)

Details

Provenance
jahAuthored on Dec 26 2023, 2:02 AM
Reviewer
kib
Differential Revision
D43816: VFS: update VOP_FSYNC() debug check to reflect actual locking policy
Parents
rGebe18cb1a545: snd_uaudio(4): Fix sample rate selection after 42fdcd9fd917.
Branches
Unknown
Tags
Unknown