libafs: consistently hold vnode refs
authorAndrew Deason <adeason@sinenomine.net>
Tue, 18 May 2010 16:39:21 +0000 (11:39 -0500)
committerDerrick Brashear <shadow@dementia.org>
Mon, 7 Jun 2010 18:55:56 +0000 (11:55 -0700)
commitb89a9e4fa001b453a3ef5f041ac7978ba696b8e3
tree6d6a0caa20a3f039b0fefd7aa0c6d923b0520c53
parenteee8bc9cf9fa53488abd973249b8b61bc3f61956
libafs: consistently hold vnode refs

Make all common libafs code call AFS_FAST_HOLD to hold an afs vnode
reference, instead of sometimes calling VN_HOLD(AFSTOV(tvc)) directly.
Make AFS_FAST_HOLD always call osi_vnhold, and have each platform
define osi_vnhold for their platform-specific quirks (as it was doing
before).

This way, if a platform has an osi_vnhold that is special somehow (on
solaris, we bump a VFS refcount if the vnode refcount goes from 0->1),
it will always be called on vnode references.

Change-Id: I7bb2b5ac116c8e86f6c6c0d40f414523870275a3
Reviewed-on: http://gerrit.openafs.org/1987
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
src/afs/AIX/osi_machdep.h
src/afs/SOLARIS/osi_vfsops.c
src/afs/VNOPS/afs_vnop_fid.c
src/afs/VNOPS/afs_vnop_remove.c
src/afs/afs.h
src/afs/afs_callback.c
src/afs/afs_daemons.c
src/afs/afs_osi.h
src/afs/afs_pioctl.c
src/afs/afs_vcache.c