Date: Wed, 4 Oct 2017 07:35:49 +0000 (UTC) From: Andriy Gapon <avg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r324251 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs Message-ID: <201710040735.v947Znjg099137@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201710040735.v947Znjg099137>