diff options
author | phk <phk@FreeBSD.org> | 2005-02-19 11:44:57 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2005-02-19 11:44:57 +0000 |
commit | 66dfd6396149e353342cd31080e6b88469aec335 (patch) | |
tree | d9295850a39808606f8fe29612e510d2f3b4ef1a /sys/ufs | |
parent | 480b39e8f236038a1603ca2d67104be32bf2b696 (diff) | |
download | FreeBSD-src-66dfd6396149e353342cd31080e6b88469aec335.zip FreeBSD-src-66dfd6396149e353342cd31080e6b88469aec335.tar.gz |
Try to unbreak the vnode locking around vop_reclaim() (based mostly on
patch from kan@).
Pull bufobj_invalbuf() out of vinvalbuf() and make g_vfs call it on
close. This is not yet a generally safe function, but for this very
specific use it is safe. This solves the problem with buffers not
being flushed by unmount or after failed mount attempts.
Diffstat (limited to 'sys/ufs')
-rw-r--r-- | sys/ufs/ffs/ffs_vfsops.c | 2 | ||||
-rw-r--r-- | sys/ufs/ufs/ufs_inode.c | 2 |
2 files changed, 1 insertions, 3 deletions
diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c index 0499224..6635e2b 100644 --- a/sys/ufs/ffs/ffs_vfsops.c +++ b/sys/ufs/ffs/ffs_vfsops.c @@ -794,7 +794,6 @@ ffs_mountfs(devvp, mp, td) out: if (bp) brelse(bp); - vinvalbuf(devvp, V_SAVE, td, 0, 0); if (cp != NULL) { DROP_GIANT(); g_topology_lock(); @@ -956,7 +955,6 @@ ffs_unmount(mp, mntflags, td) return (error); } } - vinvalbuf(ump->um_devvp, V_SAVE, td, 0, 0); DROP_GIANT(); g_topology_lock(); g_vfs_close(ump->um_cp, td); diff --git a/sys/ufs/ufs/ufs_inode.c b/sys/ufs/ufs/ufs_inode.c index 7db044c..4cebcd2 100644 --- a/sys/ufs/ufs/ufs_inode.c +++ b/sys/ufs/ufs/ufs_inode.c @@ -173,12 +173,12 @@ ufs_reclaim(ap) } } #endif + vnode_destroy_vobject(vp); #ifdef UFS_DIRHASH if (ip->i_dirhash != NULL) ufsdirhash_free(ip); #endif UFS_IFREE(ump, ip); vp->v_data = 0; - vnode_destroy_vobject(vp); return (0); } |