summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
authorjeff <jeff@FreeBSD.org>2005-04-13 10:59:09 +0000
committerjeff <jeff@FreeBSD.org>2005-04-13 10:59:09 +0000
commitafab3762a03836a33f6a8bd19afdb3d9559e12ec (patch)
treed93f4bc84645fcd224218d7e1c19b2f6b18a4c6c /sys/kern
parent5642885b84d3a8dfdbf202dfbab02e5c4a93576f (diff)
downloadFreeBSD-src-afab3762a03836a33f6a8bd19afdb3d9559e12ec.zip
FreeBSD-src-afab3762a03836a33f6a8bd19afdb3d9559e12ec.tar.gz
- Change all filesystems and vfs_cache to relock the dvp once the child is
locked in the ISDOTDOT case. Se vfs_lookup.c r1.79 for details. Sponsored by: Isilon Systems, Inc.
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/vfs_cache.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c
index f911a21..88e32de 100644
--- a/sys/kern/vfs_cache.c
+++ b/sys/kern/vfs_cache.c
@@ -344,6 +344,7 @@ cache_lookup(dvp, vpp, cnp)
{
struct namecache *ncp;
u_int32_t hash;
+ int error;
if (!doingcache) {
cnp->cn_flags &= ~MAKEENTRY;
@@ -447,9 +448,10 @@ success:
VOP_UNLOCK(dvp, 0, cnp->cn_thread);
VI_LOCK(*vpp);
CACHE_UNLOCK();
- if (vget(*vpp, cnp->cn_lkflags | LK_INTERLOCK, cnp->cn_thread)) {
- if (cnp->cn_flags & ISDOTDOT)
- vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY, cnp->cn_thread);
+ error = vget(*vpp, cnp->cn_lkflags | LK_INTERLOCK, cnp->cn_thread);
+ if (cnp->cn_flags & ISDOTDOT)
+ vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY, cnp->cn_thread);
+ if (error) {
*vpp = NULL;
goto retry;
}
OpenPOWER on IntegriCloud