svn commit: r248653 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

Will Andrews will at FreeBSD.org
Sat Mar 23 16:34:57 UTC 2013


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;


More information about the svn-src-all mailing list