Author: avg
Date: Wed Oct 4 07:35:49 2017
New Revision: 324251
URL: https://svnweb.freebsd.org/changeset/base/324251
Log:
MFC r323481: zfsvfs_hold: assert that the busied filesystem can not be
unmounted
Modified:
stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
==============================================================================
--- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
Wed Oct 4 07:35:01 2017 (r324250)
+++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
Wed Oct 4 07:35:49 2017 (r324251)
@@ -1485,6 +1485,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
@@ -1494,6 +1495,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);
}
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "[email protected]"