summaryrefslogtreecommitdiffstats
path: root/sys/ufs
diff options
context:
space:
mode:
authorjeff <jeff@FreeBSD.org>2005-03-17 11:58:43 +0000
committerjeff <jeff@FreeBSD.org>2005-03-17 11:58:43 +0000
commit479ac055a18b3122ef3d329f1d761e84da4df9b7 (patch)
treebdb04f8e86b68b355c6026836e722568807f76c0 /sys/ufs
parent8a3be2209ecb3c360c64c0079b1e54348ee647ff (diff)
downloadFreeBSD-src-479ac055a18b3122ef3d329f1d761e84da4df9b7.zip
FreeBSD-src-479ac055a18b3122ef3d329f1d761e84da4df9b7.tar.gz
- Lock the clearing of v_data in ufs_reclaim() to prevent a pagefault
in ffs_lock() when it acesses v_data without the vnlock. Sponsored by: Isilon Systems, Inc.
Diffstat (limited to 'sys/ufs')
-rw-r--r--sys/ufs/ufs/ufs_inode.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/ufs/ufs/ufs_inode.c b/sys/ufs/ufs/ufs_inode.c
index b674c94..72a10f1 100644
--- a/sys/ufs/ufs/ufs_inode.c
+++ b/sys/ufs/ufs/ufs_inode.c
@@ -174,7 +174,13 @@ ufs_reclaim(ap)
if (ip->i_dirhash != NULL)
ufsdirhash_free(ip);
#endif
- UFS_IFREE(ump, ip);
+ /*
+ * Lock the clearing of v_data so ffs_lock() can inspect it
+ * prior to obtaining the lock.
+ */
+ VI_LOCK(vp);
vp->v_data = 0;
+ VI_UNLOCK(vp);
+ UFS_IFREE(ump, ip);
return (0);
}
OpenPOWER on IntegriCloud