Skip to content

Commit 8344213

Browse files
mkjMiklos Szeredi
authored andcommitted
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: libfuse/libfuse#925 Signed-off-by: Matt Johnston <matt@codeconstruct.com.au> Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
1 parent 841c7b8 commit 8344213

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

fs/fuse/dir.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1137,6 +1137,8 @@ static int fuse_link(struct dentry *entry, struct inode *newdir,
11371137
else if (err == -EINTR)
11381138
fuse_invalidate_attr(inode);
11391139

1140+
if (err == -ENOSYS)
1141+
err = -EPERM;
11401142
return err;
11411143
}
11421144

0 commit comments

Comments
 (0)