HomeFreeBSD

vfs: allow v_usecount to transition 0->1 without the interlock

Description

vfs: allow v_usecount to transition 0->1 without the interlock

There is nothing to do but to bump the count even during said transition.
There are 2 places which can do it:

  • vget only does this after locking the vnode, meaning there is no change in contract versus inactive or reclamantion
  • vref only ever did it with the interlock held which did not protect against either (that is, it would always succeed)

VCHR vnodes retain special casing due to the need to maintain dev use count.

Reviewed by: jeff, kib
Tested by: pho (previous version)
Differential Revision: https://reviews.freebsd.org/D23185

Details

Committed
mjgJan 24 2020, 7:47 AM
Reviewer
jeff
Differential Revision
D23185: 2/3 vfs: allow v_usecount to transition 0->1 without the interlock
Parents
rS357071: vfs: stop handling VI_OWEINACT in vget
Branches
Unknown
Tags
Unknown