HomeFreeBSD

unionfs: remove LK_UPGRADE if falling back to the standard lock

Description

unionfs: remove LK_UPGRADE if falling back to the standard lock

The LK_UPGRADE operation may have temporarily dropped the upper or
lower vnode's lock. If the unionfs vnode was reclaimed during that
window, its lock field will be reset to no longer point at the
upper/lower vnode lock, so the lock operation will use the standard
lock stored in v_lock. Remove LK_UPGRADE from the flags in this case
to avoid a lockmgr assertion, as this lock has not been previously
owned by the calling thread.

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

Details

Provenance
jahAuthored on Jan 16 2023, 9:46 PM
Reviewer
kib
Differential Revision
D39272: unionfs: remove LK_UPGRADE if falling back to the standard lock
Parents
rG21ef48af5c0f: xargs: improve foundeof check for -E
Branches
Unknown
Tags
Unknown