Author: mjg
Date: Sat Dec 31 13:10:08 2016
New Revision: 310973
URL: https://svnweb.freebsd.org/changeset/base/310973

Log:
  MFC r309307,r309308:
  
      vfs: avoid VOP_ISLOCKED in the common case in lookup
  
  ==
  
      vfs: fix a whitespace nit in r309307

Modified:
  stable/11/sys/kern/vfs_lookup.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/kern/vfs_lookup.c
==============================================================================
--- stable/11/sys/kern/vfs_lookup.c     Sat Dec 31 13:10:06 2016        
(r310972)
+++ stable/11/sys/kern/vfs_lookup.c     Sat Dec 31 13:10:08 2016        
(r310973)
@@ -802,9 +802,8 @@ unionlookup:
         * If we have a shared lock we may need to upgrade the lock for the
         * last operation.
         */
-       if (dp != vp_crossmp &&
-           VOP_ISLOCKED(dp) == LK_SHARED &&
-           (cnp->cn_flags & ISLASTCN) && (cnp->cn_flags & LOCKPARENT))
+       if ((cnp->cn_flags & LOCKPARENT) && (cnp->cn_flags & ISLASTCN) &&
+           dp != vp_crossmp && VOP_ISLOCKED(dp) == LK_SHARED)
                vn_lock(dp, LK_UPGRADE|LK_RETRY);
        if ((dp->v_iflag & VI_DOOMED) != 0) {
                error = ENOENT;
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to