From b656710d30e6227c5bab75805ef422d237359f46 Mon Sep 17 00:00:00 2001 From: Andrew Deason Date: Sun, 20 May 2012 17:16:37 -0500 Subject: [PATCH] FBSD: Do not vgone() in osi_VM_FlushVCache osi_VM_FlushVCache just needs to remove VM references to the given vcache; calling vgone() entirely should be unnecessary. Remove the call to vgone() and other osi_TryEvictVCache-ish stuff, and just try to cache_purge the vnode, like the other BSD implementations do. Change-Id: I71d71f137c04d9ef3625f6a8ae22f0ffb90b9637 Reviewed-on: http://gerrit.openafs.org/7433 Reviewed-by: Benjamin Kaduk Tested-by: BuildBot --- src/afs/FBSD/osi_vm.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/src/afs/FBSD/osi_vm.c b/src/afs/FBSD/osi_vm.c index d5d56f7..40ba119 100644 --- a/src/afs/FBSD/osi_vm.c +++ b/src/afs/FBSD/osi_vm.c @@ -99,23 +99,17 @@ osi_VM_FlushVCache(struct vcache *avc, int *slept) return code; } - if ((vp->v_iflag & VI_DOOMED) != 0) { - VI_UNLOCK(vp); - return 0; - } - - /* must hold the vnode before calling vgone() + /* must hold the vnode before calling cache_purge() * This code largely copied from vfs_subr.c:vlrureclaim() */ vholdl(vp); + VI_UNLOCK(vp); + AFS_GUNLOCK(); - *slept = 1; - /* use the interlock while locking, so no one else can DOOM this */ - ilock_vnode(vp); - vgone(vp); - unlock_vnode(vp); + cache_purge(vp); + AFS_GLOCK(); + vdrop(vp); - AFS_GLOCK(); return 0; } -- 1.9.4