diff options
author | mjg <mjg@FreeBSD.org> | 2016-12-31 13:10:08 +0000 |
---|---|---|
committer | mjg <mjg@FreeBSD.org> | 2016-12-31 13:10:08 +0000 |
commit | a1a1877db83d7c5aa4ce309712bbc253b1802cff (patch) | |
tree | ead02f4df20fde4f83ab9ab053befcbbbe2904aa | |
parent | d105a8765c1bdb35687287537bbae5ef94a663a7 (diff) | |
download | FreeBSD-src-a1a1877db83d7c5aa4ce309712bbc253b1802cff.zip FreeBSD-src-a1a1877db83d7c5aa4ce309712bbc253b1802cff.tar.gz |
MFC r309307,r309308:
vfs: avoid VOP_ISLOCKED in the common case in lookup
==
vfs: fix a whitespace nit in r309307
-rw-r--r-- | sys/kern/vfs_lookup.c | 5 |
1 files 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; |