From 1d5ddeb9dbb34108f5c3c1b6356d9dcdd86988d5 Mon Sep 17 00:00:00 2001 From: Chas Williams Date: Wed, 2 Jun 2004 20:40:34 +0000 Subject: [PATCH] gconfd-lock-fix-20040602 FIXES 4905 "i believe i have managed to track this down to a missing lock_kernel() in the dentry (lookup) revalidate routine. this missing lock was already fixed in the 1.3 tree when i submitted the 2.6 support patches (although its not quite right i think -- the shrink_dcace_parent() should happen under the BKL)" --- src/afs/LINUX/osi_vnodeops.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c index d10e3c31f..b11328297 100644 --- a/src/afs/LINUX/osi_vnodeops.c +++ b/src/afs/LINUX/osi_vnodeops.c @@ -852,13 +852,15 @@ afs_linux_dentry_revalidate(struct dentry *dp) struct vcache *lookupvcp = NULL; int code, bad_dentry = 1; struct sysname_info sysState; - struct vcache *vcp = ITOAFS(dp->d_inode); - struct vcache *parentvcp = ITOAFS(dp->d_parent->d_inode); + struct vcache *vcp, *parentvcp; + + sysState.allocked = 0; AFS_GLOCK(); lock_kernel(); - sysState.allocked = 0; + vcp = ITOAFS(dp->d_inode); + parentvcp = ITOAFS(dp->d_parent->d_inode); /* If it's a negative dentry, then there's nothing to do. */ if (!vcp || !parentvcp) @@ -909,14 +911,14 @@ afs_linux_dentry_revalidate(struct dentry *dp) if (sysState.allocked) osi_FreeLargeSpace(name); - AFS_GUNLOCK(); - crfree(credp); - if (bad_dentry) { shrink_dcache_parent(dp); d_drop(dp); } + unlock_kernel(); + AFS_GUNLOCK(); + crfree(credp); return !bad_dentry; } -- 2.39.5