Date: Wed, 30 Nov 2016 02:14:53 +0000 (UTC) From: Mateusz Guzik <mjg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309307 - head/sys/kern Message-ID: <201611300214.uAU2Er5q077244@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mjg Date: Wed Nov 30 02:14:53 2016 New Revision: 309307 URL: https://svnweb.freebsd.org/changeset/base/309307 Log: vfs: avoid VOP_ISLOCKED in the common case in lookup Modified: head/sys/kern/vfs_lookup.c Modified: head/sys/kern/vfs_lookup.c ============================================================================== --- head/sys/kern/vfs_lookup.c Wed Nov 30 02:00:30 2016 (r309306) +++ head/sys/kern/vfs_lookup.c Wed Nov 30 02:14:53 2016 (r309307) @@ -807,10 +807,9 @@ 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)) - vn_lock(dp, LK_UPGRADE|LK_RETRY); + 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; goto bad;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201611300214.uAU2Er5q077244>