From: Matt Johnston <matt@codeconstruct.com.au>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: linux-fsdevel@vger.kernel.org,
Matt Johnston <matt@codeconstruct.com.au>
Subject: [PATCH] fuse: Return EPERM rather than ENOSYS from link()
Date: Fri, 14 Feb 2025 09:17:53 +0800 [thread overview]
Message-ID: <20250214-fuse-link-eperm-v1-1-8c241d987008@codeconstruct.com.au> (raw)
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>
---
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@codeconstruct.com.au>
next reply other threads:[~2025-02-14 1:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-14 1:17 Matt Johnston [this message]
2025-02-14 10:06 ` [PATCH] fuse: Return EPERM rather than ENOSYS from link() Miklos Szeredi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250214-fuse-link-eperm-v1-1-8c241d987008@codeconstruct.com.au \
--to=matt@codeconstruct.com.au \
--cc=linux-fsdevel@vger.kernel.org \
--cc=miklos@szeredi.hu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).