]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/commit
MFC r248653: ZFS: Fix a panic while unmounting a busy filesystem.
authorwill <will@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 28 Oct 2013 14:27:35 +0000 (14:27 +0000)
committerwill <will@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 28 Oct 2013 14:27:35 +0000 (14:27 +0000)
commit4ed174c0a348d41466653ce200ee8399eb87c891
tree8316ef7a02b61dc80526339844403566a31523af
parent54b546215a9d6d12c9c66d1ec1cd88e3788b2ac5
MFC r248653: ZFS: Fix a panic while unmounting a busy filesystem.

This particular scenario was easily reproduced using a NFS export.  When the
first 'zfs unmount' occurred, it returned EBUSY via this path, while
vflush() had flushed references on the filesystem's root vnode, which in
turn caused its v_interlock to be destroyed.  The next time 'zfs unmount'
was called, vflush() tried to obtain this lock, which caused this panic.

Since vflush() on FreeBSD is a definitive call, there is no need to check
vfsp->vfs_count after it completes.  Simply #ifdef sun this check.

git-svn-id: svn://svn.freebsd.org/base/stable/9@257253 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c