FBSD: lock interlock around v_usecount accesses
authorBen Kaduk <kaduk@mit.edu>
Fri, 29 Oct 2010 16:01:04 +0000 (12:01 -0400)
committerDerrick Brashear <shadow@dementia.org>
Fri, 29 Oct 2010 19:03:49 +0000 (12:03 -0700)
commitb6367aa84b9d1c7529b6f3a12bbfeacc91384ffb
treecb9e13a2cb6402ca6dcbce22f3731cbbd0e58bd8
parent812333c9a0d4722142d22186fe9b07b39fe6993b
FBSD: lock interlock around v_usecount accesses

The FreeBSD vnode locking strategy requires that the vnode
interlock be held for all accesses to v_usecount, such as those
used by our VREFCOUNT and VREFCOUNT_GT macros.  Conveniently,
a wrapper function is provided that takes the lock around its
access of the element, vrefcnt().  Use it for our macros.

Change-Id: Ia88eb21046fe844a6adb830734dcae2f76ef2dc5
Reviewed-on: http://gerrit.openafs.org/3195
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
src/afs/afs.h