From: Matt Johnston Date: Fri, 14 Feb 2025 01:17:53 +0000 (+0800) Subject: fuse: Return EPERM rather than ENOSYS from link() X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=8344213571b2ac8caf013cfd3b37bc3467c3a893;p=users%2Fjedix%2Flinux-maple.git 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 Signed-off-by: Miklos Szeredi --- diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c index 3805f9b06c9d2..1717ae0d08647 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; }