From a1a1877db83d7c5aa4ce309712bbc253b1802cff Mon Sep 17 00:00:00 2001 From: mjg Date: Sat, 31 Dec 2016 13:10:08 +0000 Subject: MFC r309307,r309308: vfs: avoid VOP_ISLOCKED in the common case in lookup == vfs: fix a whitespace nit in r309307 --- sys/kern/vfs_lookup.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c index 0fff629..e8a2c83 100644 --- a/sys/kern/vfs_lookup.c +++ b/sys/kern/vfs_lookup.c @@ -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; -- cgit v1.1