diff options
author | avg <avg@FreeBSD.org> | 2016-07-13 09:47:54 +0000 |
---|---|---|
committer | avg <avg@FreeBSD.org> | 2016-07-13 09:47:54 +0000 |
commit | 1980e30bd7bab8145f0dd0965b7da603342e7764 (patch) | |
tree | a5f0e782d84e0de8ddc5e550659fc28eb8ad6ad7 /sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c | |
parent | 39571e4eceeef9408be5ff772014803a167f8f2c (diff) | |
download | FreeBSD-src-1980e30bd7bab8145f0dd0965b7da603342e7764.zip FreeBSD-src-1980e30bd7bab8145f0dd0965b7da603342e7764.tar.gz |
MFC r299908,300131,301275: zfs: set VROOT / VV_ROOT consistently and in
a single place
Diffstat (limited to 'sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c')
-rw-r--r-- | sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c index 431a05d..3853838 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c @@ -574,9 +574,10 @@ zfs_znode_sa_init(zfsvfs_t *zfsvfs, znode_t *zp, zp->z_is_sa = (obj_type == DMU_OT_SA) ? B_TRUE : B_FALSE; /* - * Slap on VROOT if we are the root znode + * Slap on VROOT if we are the root znode unless we are the root + * node of a snapshot mounted under .zfs. */ - if (zp->z_id == zfsvfs->z_root) + if (zp->z_id == zfsvfs->z_root && zfsvfs->z_parent == zfsvfs) ZTOV(zp)->v_flag |= VROOT; mutex_exit(&zp->z_lock); |