* [PATCH] create_inode: do not fail if filesystem doesn't support xattr
@ 2022-08-18 16:31 Jürg Billeter
2022-09-19 12:33 ` Theodore Ts'o
0 siblings, 1 reply; 2+ messages in thread
From: Jürg Billeter @ 2022-08-18 16:31 UTC (permalink / raw
To: linux-ext4; +Cc: Theodore Ts'o, Jürg Billeter
As `set_inode_xattr()` doesn't fail if the `llistxattr()` function is
not available, it seems inconsistent to let `set_inode_xattr()` fail if
`llistxattr()` fails with `ENOTSUP`, indicating that the filesystem
doesn't support extended attributes.
Signed-off-by: Jürg Billeter <j@bitron.ch>
---
misc/create_inode.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/misc/create_inode.c b/misc/create_inode.c
index c00d5458..d7ab1c20 100644
--- a/misc/create_inode.c
+++ b/misc/create_inode.c
@@ -150,6 +150,8 @@ static errcode_t set_inode_xattr(ext2_filsys fs, ext2_ino_t ino,
size = llistxattr(filename, NULL, 0);
if (size == -1) {
+ if (errno == ENOTSUP)
+ return 0;
retval = errno;
com_err(__func__, retval, _("while listing attributes of \"%s\""),
filename);
--
2.35.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] create_inode: do not fail if filesystem doesn't support xattr
2022-08-18 16:31 [PATCH] create_inode: do not fail if filesystem doesn't support xattr Jürg Billeter
@ 2022-09-19 12:33 ` Theodore Ts'o
0 siblings, 0 replies; 2+ messages in thread
From: Theodore Ts'o @ 2022-09-19 12:33 UTC (permalink / raw
To: j, linux-ext4; +Cc: Theodore Ts'o
On Thu, 18 Aug 2022 18:31:32 +0200, Jürg Billeter wrote:
> As `set_inode_xattr()` doesn't fail if the `llistxattr()` function is
> not available, it seems inconsistent to let `set_inode_xattr()` fail if
> `llistxattr()` fails with `ENOTSUP`, indicating that the filesystem
> doesn't support extended attributes.
>
>
Applied, thanks!
[1/1] create_inode: do not fail if filesystem doesn't support xattr
commit: 985b46c55070c62153587e5b18ecb5310706546c
Best regards,
--
Theodore Ts'o <tytso@mit.edu>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-09-19 12:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-18 16:31 [PATCH] create_inode: do not fail if filesystem doesn't support xattr Jürg Billeter
2022-09-19 12:33 ` Theodore Ts'o
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 read-only IMAP folder(s) and NNTP newsgroup(s).