HomeFreeBSD

unionfs: do not force LK_NOWAIT if VI_OWEINACT is set

Description

unionfs: do not force LK_NOWAIT if VI_OWEINACT is set

I see no apparent need to avoid waiting on the lock just because
vinactive() may be called on another thread while the thread that
cleared the vnode refcount has the lock dropped. In fact, this
can at least lead to a panic of the form "vn_lock: error <errno>
incompatible with flags" if LK_RETRY was passed to VOP_LOCK().
In this case LK_NOWAIT may cause the underlying FS to return an
error which is incompatible with LK_RETRY.

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

Details

Provenance
jahAuthored on Jan 30 2022, 9:03 PM
Reviewer
kib
Differential Revision
D34109: assorted small fixes to unionfs_lock()
Parents
rG6ff167aa427c: unionfs: allow lock recursion when reclaiming the root vnode
Branches
Unknown
Tags
Unknown