From a69c43548dbe6bed0d84dd8b402ebe9cdc0d1b33 Mon Sep 17 00:00:00 2001 From: Jeff Roberson Date: Tue, 29 Mar 2005 10:10:01 +0000 Subject: [PATCH] - Honor the cn_lkflags passed from namei() when locking the leaf. Sponsored by: Isilon Systems, Inc. --- sys/ufs/ufs/ufs_lookup.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/ufs/ufs/ufs_lookup.c b/sys/ufs/ufs/ufs_lookup.c index ba43c5b17114..2261be8f556b 100644 --- a/sys/ufs/ufs/ufs_lookup.c +++ b/sys/ufs/ufs/ufs_lookup.c @@ -565,7 +565,7 @@ ufs_lookup(ap) if (flags & ISDOTDOT) { VOP_UNLOCK(pdp, 0, td); /* race to get the inode */ error = VFS_VGET(pdp->v_mount, dp->i_ino, - LK_EXCLUSIVE, &tdp); + cnp->cn_lkflags, &tdp); if (error) { vn_lock(pdp, LK_EXCLUSIVE | LK_RETRY, td); return (error); @@ -575,7 +575,8 @@ ufs_lookup(ap) VREF(vdp); /* we want ourself, ie "." */ *vpp = vdp; } else { - error = VFS_VGET(pdp->v_mount, dp->i_ino, LK_EXCLUSIVE, &tdp); + error = VFS_VGET(pdp->v_mount, dp->i_ino, + cnp->cn_lkflags, &tdp); if (error) return (error); *vpp = tdp;