summaryrefslogtreecommitdiffstats
path: root/sys/cddl
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2009-09-07 18:54:55 +0000
committerpjd <pjd@FreeBSD.org>2009-09-07 18:54:55 +0000
commit4478614626c31d27d0e6b15f99e44c98ff20fa81 (patch)
tree40309a25b1c981ebcf1a47de56c32ff34a86c0e2 /sys/cddl
parent6fa2ed989c038146af5356d8c2618095837c9459 (diff)
downloadFreeBSD-src-4478614626c31d27d0e6b15f99e44c98ff20fa81.zip
FreeBSD-src-4478614626c31d27d0e6b15f99e44c98ff20fa81.tar.gz
Don't recheck ownership on update mount. This will eliminate LOR between
vfs_busy() and mount mutex. We check ownership in vfs_domount() anyway. Noticed by: kib Reviewed by: kib MFC after: 1 week
Diffstat (limited to 'sys/cddl')
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c11
1 files changed, 6 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 8fc747c..27e9c81 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
@@ -719,7 +719,10 @@ zfs_mount(vfs_t *vfsp)
error = secpolicy_fs_mount(cr, mvp, vfsp);
if (error) {
error = dsl_deleg_access(osname, ZFS_DELEG_PERM_MOUNT, cr);
- if (error == 0) {
+ if (error != 0)
+ goto out;
+
+ if (!(vfsp->vfs_flag & MS_REMOUNT)) {
vattr_t vattr;
/*
@@ -753,11 +756,9 @@ zfs_mount(vfs_t *vfsp)
}
VOP_UNLOCK(mvp, 0);
#endif
-
- secpolicy_fs_mount_clearopts(cr, vfsp);
- } else {
- goto out;
}
+
+ secpolicy_fs_mount_clearopts(cr, vfsp);
}
/*
OpenPOWER on IntegriCloud