Date: Sat, 23 Mar 2013 16:34:57 +0000 (UTC) From: Will Andrews <will@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248653 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs Message-ID: <201303231634.r2NGYvoj099629@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: will Date: Sat Mar 23 16:34:56 2013 New Revision: 248653 URL: http://svnweb.freebsd.org/changeset/base/248653 Log: 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. Submitted by: avg Reviewed by: avg Approved by: ken (mentor) MFC after: 1 month Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Sat Mar 23 16:06:20 2013 (r248652) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Sat Mar 23 16:34:56 2013 (r248653) @@ -1968,6 +1968,7 @@ zfs_umount(vfs_t *vfsp, int fflag) return (ret); } +#ifdef sun if (!(fflag & MS_FORCE)) { /* * Check the number of active vnodes in the file system. @@ -1988,6 +1989,7 @@ zfs_umount(vfs_t *vfsp, int fflag) return (EBUSY); } } +#endif VERIFY(zfsvfs_teardown(zfsvfs, B_TRUE) == 0); os = zfsvfs->z_os;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201303231634.r2NGYvoj099629>