Index: trunk/server/common/patches/openafs-revert-d_drop-new-file.patch
===================================================================
--- trunk/server/common/patches/openafs-revert-d_drop-new-file.patch	(revision 2633)
+++ trunk/server/common/patches/openafs-revert-d_drop-new-file.patch	(revision 2634)
@@ -1,3 +1,3 @@
-From 097b5d31bcc325c7e33b1dcdf586c7b77bd00cbe Mon Sep 17 00:00:00 2001
+From 88f51eecfc5a5edb92b252b202c24e54298fe129 Mon Sep 17 00:00:00 2001
 From: Anders Kaseorg <andersk@mit.edu>
 Date: Sun, 12 Oct 2014 22:21:40 -0400
@@ -5,43 +5,39 @@
  log differences
 
-This reverts commit 81f1814b566cb3b1cda97be4c48b9788cd7addd0, and adds
-a warning message whenever it would have taken effect on a directory.
+This effectively reverts commit
+81f1814b566cb3b1cda97be4c48b9788cd7addd0, and adds a warning message
+whenever it would have taken effect.
 
-Change-Id: I60e3a5feb49329b07c07b09edeb4b3c416faaac1
+Change-Id: If470195b1eeb23d33693ade8d6fc79e903663529
 ---
- src/afs/LINUX/osi_vnodeops.c | 22 +++++++++++++++-------
- 1 file changed, 15 insertions(+), 7 deletions(-)
+ src/afs/LINUX/osi_vnodeops.c | 18 ++++++++++++++++++
+ 1 file changed, 18 insertions(+)
 
 diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c
-index 2a8253e..6f0bbfb 100644
+index 2a8253e..e22f62a 100644
 --- a/src/afs/LINUX/osi_vnodeops.c
 +++ b/src/afs/LINUX/osi_vnodeops.c
-@@ -1245,14 +1245,22 @@ afs_linux_dentry_revalidate(struct dentry *dp, int flags)
- 	    code = afs_lookup(pvcp, (char *)dp->d_name.name, &tvc, credp);
- 	    if (!tvc || tvc != vcp) {
- 		dput(parent);
--		/* Force unhash; the name doesn't point to this file
--		 * anymore. */
--		force_drop = 1;
--		if (code && code != ENOENT) {
--		    /* ...except if we couldn't perform the actual lookup,
--		     * we don't know if the name points to this file or not. */
--		    force_drop = 0;
-+		/* Force unhash if name is known not to exist. */
-+		if (code == ENOENT)
-+		    force_drop = 1;
-+
-+		if (code == 0) {
-+		    /* As of http://gerrit.openafs.org/11358, upstream
-+		     * also sets force_drop = 1 in the code == 0 case,
-+		     * but that seems to exacerbate the getcwd()
-+		     * ENOENT problem. */
-+		    if (dp->d_inode && S_ISDIR(dp->d_inode->i_mode)) {
-+			char buf[256];
-+			char *path = dentry_path_raw(dp, buf, sizeof(buf));
-+			pr_warn("openafs: Rescued directory /afs/%s from force_drop\n", IS_ERR(path) ? "(error)" : path);
-+		    }
+@@ -1253,6 +1253,24 @@ afs_linux_dentry_revalidate(struct dentry *dp, int flags)
+ 		     * we don't know if the name points to this file or not. */
+ 		    force_drop = 0;
  		}
-+
++		if (force_drop && tvc && tvc != vcp &&
++		    !(dp->d_inode && S_ISREG(dp->d_inode->i_mode))) {
++		    /* workaround and logging for GCO RT 131780 */
++		    char buf[256];
++		    char *path = dentry_path_raw(dp, buf, sizeof(buf));
++		    afs_warn("afs: RT 131780: got back a different vcache for /afs%s: "
++			     "vcp: %u.%u.%u mvstat %d, tvc: %u.%u.%u mvstat %d\n",
++			     IS_ERR(path) ? "/(bad path)" : path,
++			     (unsigned)vcp->f.fid.Fid.Volume,
++			     (unsigned)vcp->f.fid.Fid.Vnode,
++			     (unsigned)vcp->f.fid.Fid.Unique,
++			     (int)vcp->mvstat,
++			     (unsigned)tvc->f.fid.Fid.Volume,
++			     (unsigned)tvc->f.fid.Fid.Vnode,
++			     (unsigned)tvc->f.fid.Fid.Unique,
++			     (int)tvc->mvstat);
++		    force_drop = 0;
++		}
  		goto bad_dentry;
  	    }
