summaryrefslogtreecommitdiffstats
path: root/sys/cddl
diff options
context:
space:
mode:
authoravg <avg@FreeBSD.org>2015-05-25 11:35:27 +0000
committeravg <avg@FreeBSD.org>2015-05-25 11:35:27 +0000
commitb7743f6ee40fa0d16376b3437757b54911a6c06b (patch)
treeda0fae0673d1199611803b1a10e18f0b1b18191e /sys/cddl
parentd1a5bd2d1eca43815b56f7d3acbeb7b8d554cc59 (diff)
downloadFreeBSD-src-b7743f6ee40fa0d16376b3437757b54911a6c06b.zip
FreeBSD-src-b7743f6ee40fa0d16376b3437757b54911a6c06b.tar.gz
MFC r282475: zfs: do not hold an extra reference on a root vnode
Diffstat (limited to 'sys/cddl')
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_znode.h4
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c7
2 files changed, 2 insertions, 9 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_znode.h b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_znode.h
index 3fb66c8..c8e3105 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_znode.h
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_znode.h
@@ -261,10 +261,6 @@ VTOZ(vnode_t *vp)
} \
}
-/* Called on entry to each ZFS vnode and vfs operation that can not return EIO */
-#define ZFS_ENTER_NOERROR(zfsvfs) \
- rrm_enter(&(zfsvfs)->z_teardown_lock, RW_READER, FTAG)
-
/* Must be called before exiting the vop */
#define ZFS_EXIT(zfsvfs) rrm_exit(&(zfsvfs)->z_teardown_lock, FTAG)
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c
index cdeb454..67ae8f5 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c
@@ -1222,9 +1222,6 @@ zfs_domount(vfs_t *vfsp, char *osname)
}
vfs_mountedfrom(vfsp, osname);
- /* Grab extra reference. */
- VERIFY(VFS_ROOT(vfsp, LK_EXCLUSIVE, &vp) == 0);
- VOP_UNLOCK(vp, 0);
if (!zfsvfs->z_issnap)
zfsctl_create(zfsvfs);
@@ -1802,7 +1799,7 @@ zfs_root(vfs_t *vfsp, int flags, vnode_t **vpp)
znode_t *rootzp;
int error;
- ZFS_ENTER_NOERROR(zfsvfs);
+ ZFS_ENTER(zfsvfs);
error = zfs_zget(zfsvfs, zfsvfs->z_root, &rootzp);
if (error == 0)
@@ -1977,7 +1974,7 @@ zfs_umount(vfs_t *vfsp, int fflag)
/*
* Flush all the files.
*/
- ret = vflush(vfsp, 1, (fflag & MS_FORCE) ? FORCECLOSE : 0, td);
+ ret = vflush(vfsp, 0, (fflag & MS_FORCE) ? FORCECLOSE : 0, td);
if (ret != 0) {
if (!zfsvfs->z_issnap) {
zfsctl_create(zfsvfs);
OpenPOWER on IntegriCloud