From 350f96b4bfb4f448e5d1daefbab2238552c76cf9 Mon Sep 17 00:00:00 2001 From: kib Date: Thu, 2 Jul 2009 18:02:55 +0000 Subject: In vn_vget_ino() and their inline equivalents, mnt_ref() the mount point around the sequence that drop vnode lock and then busies the mount point. Not having vlocked node or direct reference to the mp allows for the forced unmount to proceed, making mp unmounted or reused. Tested by: pho Reviewed by: jeff Approved by: re (kensmith) MFC after: 2 weeks --- sys/ufs/ffs/ffs_softdep.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sys/ufs/ffs') diff --git a/sys/ufs/ffs/ffs_softdep.c b/sys/ufs/ffs/ffs_softdep.c index d7b8818..72522b2 100644 --- a/sys/ufs/ffs/ffs_softdep.c +++ b/sys/ufs/ffs/ffs_softdep.c @@ -5104,9 +5104,11 @@ softdep_fsync(vp) FFSV_FORCEINSMQ)) { error = vfs_busy(mp, MBF_NOWAIT); if (error != 0) { + vfs_ref(mp); VOP_UNLOCK(vp, 0); error = vfs_busy(mp, 0); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); + vfs_rel(mp); if (error != 0) return (ENOENT); if (vp->v_iflag & VI_DOOMED) { -- cgit v1.1