HomeFreeBSD

cache: add cache_purge_vgone

Description

cache: add cache_purge_vgone

cache_purge locklessly checks whether the vnode at hand has any namecache
entries. This can race with a concurrent purge which managed to remove
the last entry, but may not be done touching the vnode.

Make sure we observe the relevant vnode lock as not taken before proceeding
with vgone.

Paired with the fact that doomed vnodes cannnot receive entries this restores
the invariant that there are no namecache-related writing users past cache_purge
in vgone.

Reported by: pho

Details

Provenance
mjgAuthored on
Parents
rS363871: mtx: add mtx_wait_unlocked
Branches
Unknown
Tags
Unknown