[PATCH] fuse: Return EPERM rather than ENOSYS from link()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxxxx>
---
 fs/fuse/dir.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c
index 198862b086ff7bad4007ec2f3200377d12a78385..f07ccaefd1ecfe02b806c30fa9edc6f481260ee8 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;
 }
 

---
base-commit: 68763b29e0a6441f57f9ee652bbf8e7bc59183e5
change-id: 20250214-fuse-link-eperm-544b081eac34

Best regards,
-- 
Matt Johnston <matt@xxxxxxxxxxxxxxxxxxxx>





[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux