summaryrefslogtreecommitdiffstats
path: root/sys/ufs
diff options
context:
space:
mode:
authorjeff <jeff@FreeBSD.org>2005-03-29 10:10:01 +0000
committerjeff <jeff@FreeBSD.org>2005-03-29 10:10:01 +0000
commit16ed71ae90e77e41be6d7b6db63ab38b184c88fc (patch)
treefed6e9f1941ac89239b993a9138280f353c92bd6 /sys/ufs
parent767230ce780384c3e83434302e1a0afbde2d1391 (diff)
downloadFreeBSD-src-16ed71ae90e77e41be6d7b6db63ab38b184c88fc.zip
FreeBSD-src-16ed71ae90e77e41be6d7b6db63ab38b184c88fc.tar.gz
- Honor the cn_lkflags passed from namei() when locking the leaf.
Sponsored by: Isilon Systems, Inc.
Diffstat (limited to 'sys/ufs')
-rw-r--r--sys/ufs/ufs/ufs_lookup.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/ufs/ufs/ufs_lookup.c b/sys/ufs/ufs/ufs_lookup.c
index ba43c5b..2261be8 100644
--- a/sys/ufs/ufs/ufs_lookup.c
+++ b/sys/ufs/ufs/ufs_lookup.c
@@ -565,7 +565,7 @@ found:
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 @@ found:
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;
OpenPOWER on IntegriCloud