HomeFreeBSD

unionfs: fix assertion order in unionfs_lock()

Description

unionfs: fix assertion order in unionfs_lock()

VOP_LOCK() may be handed a vnode that is concurrently reclaimed.
unionfs_lock() accounts for this by checking for empty vnode private
data under the interlock. But it incorrectly asserts that the vnode
is using the unionfs dispatch table before making this check.
Reverse the order, and also update KASSERT_UNIONFS_VNODE() to provide
more useful information.

Reported by: pho
Reviewed by: kib, markj, pho
Differential Revision: https://reviews.freebsd.org/D34109

Details

Provenance
jahAuthored on Jan 30 2022, 8:43 PM
Reviewer
kib
Differential Revision
D34109: assorted small fixes to unionfs_lock()
Parents
rGef061a2e2978: __ctype_load(): check for calloc() failure
Branches
Unknown
Tags
Unknown