aboutsummaryrefslogtreecommitdiffstats
path: root/lib/fuse.c
diff options
context:
space:
mode:
authorNikolaus Rath <Nikolaus@rath.org>2022-03-14 09:25:00 +0000
committerGitHub <noreply@github.com>2022-03-14 09:25:00 +0000
commit66b04453b7a5d7aefa0a55e9101afe0347215128 (patch)
tree6420fbb2ddc1c8f04f6c4a05633401d3ceca68e1 /lib/fuse.c
parent435a14e0297cf796a19aaf04221fa14957fb3717 (diff)
parent3c2ba7aa2500618b7b11255ef3f699d6615ad5a2 (diff)
downloadlibfuse-66b04453b7a5d7aefa0a55e9101afe0347215128.tar.gz
Merge branch 'master' into fopen_noflush
Diffstat (limited to 'lib/fuse.c')
-rw-r--r--lib/fuse.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/fuse.c b/lib/fuse.c
index cc5bb14..507c80b 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;
}
@@ -4293,6 +4293,8 @@ static void fuse_lib_ioctl(fuse_req_t req, fuse_ino_t ino, unsigned int cmd,
fuse_finish_interrupt(f, req, &d);
free_path(f, ino, path);
+ if (err < 0)
+ goto err;
fuse_reply_ioctl(req, err, out_buf, out_bufsz);
goto out;
err: