HomeFreeBSD

tmpfs: remove bogus MPASS(VOP_ISLOCKED(vp)) asserts

Description

tmpfs: remove bogus MPASS(VOP_ISLOCKED(vp)) asserts

VOP_ISLOCKED() does not return bool, its only reliable use it to check
that the vnode is exclusively locked by the calling thread. Almost all
asserts of this form repeated auto-generated assertions from
vnode_if.src for VOPs, in the incorrect way.

In two places where the assertions would be meaningful, convert them to
ASSERT_VOP_LOCKED() statements.

Reviewed by: markj, mjg
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D38576

Details

Provenance
kibAuthored on Feb 13 2023, 11:23 PM
Reviewer
markj
Differential Revision
D38576: tmpfs: remove bogus MPASS(VOP_ISLOCKED(vp)) asserts
Parents
rG5942b4b6fde3: sys/param.h: Add _WANT_P_OSREL
Branches
Unknown
Tags
Unknown