HomeFreeBSD

Make locking assertions for VOP_FSYNC() and VOP_FDATASYNC() more correct

Description

Make locking assertions for VOP_FSYNC() and VOP_FDATASYNC() more correct

For devfs vnodes, it is fine to not lock vnodes for VOP_FSYNC().
Otherwise vnode must be locked exclusively, except for MNT_SHARED_WRITES()
where the shared lock is enough.

Reported and tested by: pho
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D32761

Details

Provenance
kibAuthored on Nov 3 2021, 10:28 PM
Reviewer
markj
Differential Revision
D32761: DEBUG_VFS_LOCKS: stop excluding devfs and doomed vnode from asserts
Parents
rGd1d675cb304c: freevnode(): lock the freeing vnode around destroy_vpollinfo()
Branches
Unknown
Tags
Unknown