svn commit: r324252 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Andriy Gapon
avg at FreeBSD.org
Wed Oct 4 07:36:07 UTC 2017
Author: avg
Date: Wed Oct 4 07:36:06 2017
New Revision: 324252
URL: https://svnweb.freebsd.org/changeset/base/324252
Log:
MFC r323481: zfsvfs_hold: assert that the busied filesystem can not be unmounted
Modified:
stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
==============================================================================
--- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Wed Oct 4 07:35:49 2017 (r324251)
+++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Wed Oct 4 07:36:06 2017 (r324252)
@@ -1487,6 +1487,7 @@ zfsvfs_hold(const char *name, void *tag, zfsvfs_t **zf
if (error == 0) {
rrm_enter(&(*zfvp)->z_teardown_lock, (writer) ? RW_WRITER :
RW_READER, tag);
+#ifdef illumos
if ((*zfvp)->z_unmounted) {
/*
* XXX we could probably try again, since the unmounting
@@ -1496,6 +1497,13 @@ zfsvfs_hold(const char *name, void *tag, zfsvfs_t **zf
rrm_exit(&(*zfvp)->z_teardown_lock, tag);
return (SET_ERROR(EBUSY));
}
+#else
+ /*
+ * vfs_busy() ensures that the filesystem is not and
+ * can not be unmounted.
+ */
+ ASSERT(!(*zfvp)->z_unmounted);
+#endif
}
return (error);
}
More information about the svn-src-stable-11
mailing list