svn commit: r192211 -
head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Kip Macy
kmacy at FreeBSD.org
Sat May 16 20:33:14 UTC 2009
Author: kmacy
Date: Sat May 16 20:33:13 2009
New Revision: 192211
URL: http://svn.freebsd.org/changeset/base/192211
Log:
- allow forced unmounts
- don't assume snapshot was auto-mounted
Modified:
head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c
Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Sat May 16 20:26:01 2009 (r192210)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Sat May 16 20:33:13 2009 (r192211)
@@ -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);
More information about the svn-src-head
mailing list