Author: pjd
Date: Mon Sep  7 18:54:55 2009
New Revision: 196944
URL: http://svn.freebsd.org/changeset/base/196944

Log:
  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

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    Mon Sep 
 7 18:23:26 2009        (r196943)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c    Mon Sep 
 7 18:54:55 2009        (r196944)
@@ -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);
        }
 
        /*
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to