svn commit: r257253 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

Will Andrews will at FreeBSD.org
Mon Oct 28 14:27:36 UTC 2013


Author: will
Date: Mon Oct 28 14:27:35 2013
New Revision: 257253
URL: http://svnweb.freebsd.org/changeset/base/257253

Log:
  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.

Modified:
  stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)

Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c
==============================================================================
--- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c	Mon Oct 28 14:00:06 2013	(r257252)
+++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c	Mon Oct 28 14:27:35 2013	(r257253)
@@ -1988,6 +1988,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.
@@ -2008,6 +2009,7 @@ zfs_umount(vfs_t *vfsp, int fflag)
 				return (SET_ERROR(EBUSY));
 		}
 	}
+#endif
 
 	VERIFY(zfsvfs_teardown(zfsvfs, B_TRUE) == 0);
 	os = zfsvfs->z_os;


More information about the svn-src-stable-9 mailing list