Date: Sat, 31 Dec 2016 13:10:08 +0000 (UTC) From: Mateusz Guzik <mjg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r310973 - stable/11/sys/kern Message-ID: <201612311310.uBVDA8iI092826@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201612311310.uBVDA8iI092826>