summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Johnston <matt@codeconstruct.com.au>2025-02-14 04:17:53 +0300
committerMiklos Szeredi <mszeredi@redhat.com>2025-03-31 15:55:36 +0300
commit8344213571b2ac8caf013cfd3b37bc3467c3a893 (patch)
tree18ddb52846f42cad4fbf183cde8a953f42a9ac28
parent841c7b812c038661e4f659d1b9c9a366c6d24b71 (diff)
downloadlinux-8344213571b2ac8caf013cfd3b37bc3467c3a893.tar.xz
fuse: Return EPERM rather than ENOSYS from link()
link() is documented to return EPERM when a filesystem doesn't support the operation, return that instead. Link: https://github.com/libfuse/libfuse/issues/925 Signed-off-by: Matt Johnston <matt@codeconstruct.com.au> Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
-rw-r--r--fs/fuse/dir.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c
index 3805f9b06c9d..1717ae0d0864 100644
--- a/fs/fuse/dir.c
+++ b/fs/fuse/dir.c
@@ -1137,6 +1137,8 @@ static int fuse_link(struct dentry *entry, struct inode *newdir,
else if (err == -EINTR)
fuse_invalidate_attr(inode);
+ if (err == -ENOSYS)
+ err = -EPERM;
return err;
}