diff options
-rw-r--r-- | sys/ufs/ufs/ufs_inode.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/ufs/ufs/ufs_inode.c b/sys/ufs/ufs/ufs_inode.c index b674c944b7b3..72a10f19077b 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); } |