]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
fuse: Return EPERM rather than ENOSYS from link()
authorMatt Johnston <matt@codeconstruct.com.au>
Fri, 14 Feb 2025 01:17:53 +0000 (09:17 +0800)
committerMiklos Szeredi <mszeredi@redhat.com>
Mon, 31 Mar 2025 12:55:36 +0000 (14:55 +0200)
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>
fs/fuse/dir.c

index 3805f9b06c9d2df962d786705620102b8de7fa12..1717ae0d086470451919c232449f5b8339d5062c 100644 (file)
@@ -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;
 }