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 <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
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;
}