From 4b85432743e002eae3e636febadb326c2081732d Mon Sep 17 00:00:00 2001 From: "Erik J. Burckart" Date: Fri, 16 Mar 2001 03:27:05 +0000 Subject: [PATCH] fix-for-cache-consistency-on-linux-24-smp-systems-20010315 "Here are the symptoms. I have 2 OpenAFS Linux 2.4 machines, one SMP and one not. --With both of them I access a series of directories and files within (/afs/w/x/y/z/). --I then move to the root directory. --From a third machine, I remove the directories x, y, and z. Then re-add them (same names) with some other files. --From the SMP box, I do an ls in /afs/w and see x. But x is inaccessible. --From the UP box I can see and access x. " ==================== This delta was composed from multiple commits as part of the CVS->Git migration. The checkin message with each commit was inconsistent. The following are the additional commit messages. ==================== Missed earlier: not part of the IBM delta. ==================== Part of the alpha patch slipped into the delta; Revert to previous revision --- src/afs/LINUX/osi_vnodeops.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c index 960d54c368..f6d680fa4e 100644 --- a/src/afs/LINUX/osi_vnodeops.c +++ b/src/afs/LINUX/osi_vnodeops.c @@ -628,6 +628,16 @@ static int afs_linux_revalidate(struct dentry *dp) return 0; } + /* Drop the dentry if the callback is broken */ + if (!(vcp->states & CStatd)) { + d_drop(dp); +#ifdef AFS_LINUX24_ENV + unlock_kernel(); +#endif + AFS_GUNLOCK(); + return 0; + } + /* Make this a fast path (no crref), since it's called so often. */ if (vcp->states & CStatd) { if (*dp->d_name.name != '/' && vcp->mvstat == 2) /* root vnode */