HomeFreeBSD

vfs: clean up vputx a little

Description

vfs: clean up vputx a little

  1. replace hand-rolled macros for operation type with enum
  2. unlock the vnode in vput itself, there is no need to branch on it. existence

of VPUTX_VPUT remains significant in that the inactive variant adds LK_NOWAIT
to locking request.

  1. remove the useless v_usecount assertion. few lines above the checks if

v_usecount > 0 and leaves. should the value be negative, refcount would fail.

  1. the CTR return vnode %p to the freelist is incorrect as vdrop may find the

vnode with holdcnt > 1. if the like should exist, it should be moved there

  1. no need to error = 0 for everyone

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

Details

Provenance
mjgAuthored on
Reviewer
kib
Differential Revision
D22718: vfs: clean up vputx a little
Parents
rS355535: Add a MODULE_DEPEND() for the gpioths driver. Also, note that the prior commit
Branches
Unknown
Tags
Unknown