summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKen Schalk <kcs-github@xorian.net>2022-01-11 14:56:36 -0500
committerGitHub <noreply@github.com>2022-01-11 19:56:36 +0000
commit6ddd14f2b1093434e147498db7f3b7e9aff33088 (patch)
tree8ddd4b3f137b01beab4d37aee0b4b13b8020e980
parent48ae2e72b39b6a31cb2194f6f11786b7ca06aac6 (diff)
downloadfuse-6ddd14f2b1093434e147498db7f3b7e9aff33088.tar.gz
Avoid ENOENT response when recently invalidated fuse_ino_t is received from the kernel (#636)
-rw-r--r--lib/fuse.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/fuse.c b/lib/fuse.c
index a95d7c1..f732470 100644
--- a/lib/fuse.c
+++ b/lib/fuse.c
@@ -1037,7 +1037,7 @@ static int try_get_path(struct fuse *f, fuse_ino_t nodeid, const char *name,
for (node = get_node(f, nodeid); node->nodeid != FUSE_ROOT_ID;
node = node->parent) {
- err = -ENOENT;
+ err = -ESTALE;
if (node->name == NULL || node->parent == NULL)
goto out_unlock;
@@ -1246,7 +1246,7 @@ static int get_path_nullok(struct fuse *f, fuse_ino_t nodeid, char **path)
*path = NULL;
} else {
err = get_path_common(f, nodeid, NULL, path, NULL);
- if (err == -ENOENT)
+ if (err == -ESTALE)
err = 0;
}