summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorMatt Johnston <matt@codeconstruct.com.au>2025-02-14 09:17:53 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-06-04 14:41:54 +0200
commit2371143e41735586d7aefb54c8219781a95d1aa4 (patch)
tree77ddc5f96b886244efdeee97ce3c1c6d02af9b3b /fs
parent209a4da04a27d17d83734c614af357733db9da41 (diff)
downloadlinux-2371143e41735586d7aefb54c8219781a95d1aa4.tar.gz
linux-2371143e41735586d7aefb54c8219781a95d1aa4.tar.bz2
linux-2371143e41735586d7aefb54c8219781a95d1aa4.zip
fuse: Return EPERM rather than ENOSYS from link()
[ Upstream commit 8344213571b2ac8caf013cfd3b37bc3467c3a893 ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'fs')
-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 e4d6cc0d2332..82951a535d2d 100644
--- a/fs/fuse/dir.c
+++ b/fs/fuse/dir.c
@@ -1121,6 +1121,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;
}