summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkmacy <kmacy@FreeBSD.org>2009-05-16 20:33:13 +0000
committerkmacy <kmacy@FreeBSD.org>2009-05-16 20:33:13 +0000
commitda0eac0afe323c01feeb864ea3aad9821b55045b (patch)
tree32b8a896f5c408e1ace7e184740adbb6d8a46d2b
parent23339f0750786f562704c0cdd62e2e8215e00397 (diff)
downloadFreeBSD-src-da0eac0afe323c01feeb864ea3aad9821b55045b.zip
FreeBSD-src-da0eac0afe323c01feeb864ea3aad9821b55045b.tar.gz
- allow forced unmounts
- don't assume snapshot was auto-mounted
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c8
1 files changed, 4 insertions, 4 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 835aa53..831bd2d 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
@@ -967,8 +967,7 @@ zfs_umount(vfs_t *vfsp, int fflag)
if (fflag & MS_FORCE) {
/* TODO: Force unmount is not well implemented yet, so deny it. */
- ZFS_LOG(0, "Force unmount is not supported, removing FORCE flag.");
- fflag &= ~MS_FORCE;
+ ZFS_LOG(0, "Force unmount is experimental - report any problems.");
}
ret = secpolicy_fs_unmount(cr, vfsp);
@@ -1070,8 +1069,9 @@ zfs_umount(vfs_t *vfsp, int fflag)
if (zfsvfs->z_issnap) {
vnode_t *svp = vfsp->mnt_vnodecovered;
- ASSERT(svp->v_count == 2);
- VN_RELE(svp);
+ ASSERT(svp->v_count == 2 || svp->v_count == 1);
+ if (svp->v_count == 2)
+ VN_RELE(svp);
}
zfs_freevfs(vfsp);
OpenPOWER on IntegriCloud