source:
trunk/server/common/patches/openafs-revert-d_drop-new-file.patch
@
2633
Last change on this file since 2633 was 2633, checked in by andersk, 10 years ago | |
---|---|
File size: 1.8 KB |
-
src/afs/LINUX/osi_vnodeops.c
From 097b5d31bcc325c7e33b1dcdf586c7b77bd00cbe Mon Sep 17 00:00:00 2001 From: Anders Kaseorg <andersk@mit.edu> Date: Sun, 12 Oct 2014 22:21:40 -0400 Subject: [PATCH] Revert "LINUX: Drop dentry if lookup returns new file" and log differences This reverts commit 81f1814b566cb3b1cda97be4c48b9788cd7addd0, and adds a warning message whenever it would have taken effect on a directory. Change-Id: I60e3a5feb49329b07c07b09edeb4b3c416faaac1 --- src/afs/LINUX/osi_vnodeops.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c index 2a8253e..6f0bbfb 100644
a b afs_linux_dentry_revalidate(struct dentry *dp, int flags) 1245 1245 code = afs_lookup(pvcp, (char *)dp->d_name.name, &tvc, credp); 1246 1246 if (!tvc || tvc != vcp) { 1247 1247 dput(parent); 1248 /* Force unhash; the name doesn't point to this file 1249 * anymore. */ 1250 force_drop = 1; 1251 if (code && code != ENOENT) { 1252 /* ...except if we couldn't perform the actual lookup, 1253 * we don't know if the name points to this file or not. */ 1254 force_drop = 0; 1248 /* Force unhash if name is known not to exist. */ 1249 if (code == ENOENT) 1250 force_drop = 1; 1251 1252 if (code == 0) { 1253 /* As of http://gerrit.openafs.org/11358, upstream 1254 * also sets force_drop = 1 in the code == 0 case, 1255 * but that seems to exacerbate the getcwd() 1256 * ENOENT problem. */ 1257 if (dp->d_inode && S_ISDIR(dp->d_inode->i_mode)) { 1258 char buf[256]; 1259 char *path = dentry_path_raw(dp, buf, sizeof(buf)); 1260 pr_warn("openafs: Rescued directory /afs/%s from force_drop\n", IS_ERR(path) ? "(error)" : path); 1261 } 1255 1262 } 1263 1256 1264 goto bad_dentry; 1257 1265 } 1258 1266
Note: See TracBrowser
for help on using the repository browser.