HomeFreeBSD

vfs: stop unlocking the vnode upfront in vput

Description

vfs: stop unlocking the vnode upfront in vput

Doing so runs into races with filesystems which make half-constructed vnodes
visible to other users, while depending on the chain vput -> vinactive ->
vrecycle to be executed without dropping the vnode lock.

Impediments for making this work got cleared up (notably vop_unlock_post now
does not do anything and lockmgr stops touching the lock after the final
write). Stacked filesystems keep vhold/vdrop across unlock, which arguably can
now be eliminated.

Reviewed by: jeff
Differential Revision: https://reviews.freebsd.org/D23344

Details

Provenance
mjgAuthored on Jan 24 2020, 7:44 AM
Parents
rGc00115f1089f: lockmgr: don't touch the lock past unlock
Branches
Unknown
Tags
Unknown