From 4483fe92277ab05d30233535339d2c00111b608f Mon Sep 17 00:00:00 2001 From: Jeff Roberson Date: Tue, 15 Mar 2005 01:42:58 +0000 Subject: [PATCH] - Destroy the vnode object earlier in VOP_RECLAIM as we need more of the vnode valid before the vm flushes pages. - Get rid of some extraneous uses of the vnode interlock. Sponsored by: Isilon Systems, Inc. --- sys/ufs/ufs/ufs_inode.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/ufs/ufs/ufs_inode.c b/sys/ufs/ufs/ufs_inode.c index b3d6638c236..8d524b9af9d 100644 --- a/sys/ufs/ufs/ufs_inode.c +++ b/sys/ufs/ufs/ufs_inode.c @@ -145,10 +145,12 @@ ufs_reclaim(ap) int i; #endif - VI_LOCK(vp); if (prtactive && vp->v_usecount != 0) vprint("ufs_reclaim: pushing active", vp); - VI_UNLOCK(vp); + /* + * Destroy the vm object and flush associated pages. + */ + vnode_destroy_vobject(vp); if (ip->i_flag & IN_LAZYMOD) { ip->i_flag |= IN_MODIFIED; UFS_UPDATE(vp, 0); @@ -169,7 +171,6 @@ ufs_reclaim(ap) } } #endif - vnode_destroy_vobject(vp); #ifdef UFS_DIRHASH if (ip->i_dirhash != NULL) ufsdirhash_free(ip);