diff options
author | pjd <pjd@FreeBSD.org> | 2009-09-13 21:40:36 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2009-09-13 21:40:36 +0000 |
commit | 56f8b9c6d49014776c9d2568fcd367e405c6fafc (patch) | |
tree | 84cbcca1a85df24c1fb7edcbb5cfe24d35ad075a /sys/cddl | |
parent | 840419a4c47ea0428f38b6561ec9d097eebdd6a1 (diff) | |
download | FreeBSD-src-56f8b9c6d49014776c9d2568fcd367e405c6fafc.zip FreeBSD-src-56f8b9c6d49014776c9d2568fcd367e405c6fafc.tar.gz |
Support both case: when snapshot is already mounted and when it is not yet
mounted.
MFC after: 3 days
Diffstat (limited to 'sys/cddl')
-rw-r--r-- | sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c | 8 |
1 files changed, 3 insertions, 5 deletions
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 5b8e862..34f8378 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 @@ -1182,11 +1182,10 @@ zfs_fhtovp(vfs_t *vfsp, fid_t *fidp, vnode_t **vpp) ZFS_ENTER(zfsvfs); /* - * On FreeBSD we are already called with snapshot's mount point - * and not the mount point of its parent. + * On FreeBSD we can get snapshot's mount point or its parent file + * system mount point depending if snapshot is already mounted or not. */ -#ifndef __FreeBSD__ - if (fidp->fid_len == LONG_FID_LEN) { + if (zfsvfs->z_parent == zfsvfs && fidp->fid_len == LONG_FID_LEN) { zfid_long_t *zlfid = (zfid_long_t *)fidp; uint64_t objsetid = 0; uint64_t setgen = 0; @@ -1204,7 +1203,6 @@ zfs_fhtovp(vfs_t *vfsp, fid_t *fidp, vnode_t **vpp) return (EINVAL); ZFS_ENTER(zfsvfs); } -#endif if (fidp->fid_len == SHORT_FID_LEN || fidp->fid_len == LONG_FID_LEN) { zfid_short_t *zfid = (zfid_short_t *)fidp; |