diff options
-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; |