diff options
author | Jürg Billeter <j@bitron.ch> | 2022-08-18 18:31:32 +0200 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2022-09-19 08:32:20 -0400 |
commit | 985b46c55070c62153587e5b18ecb5310706546c (patch) | |
tree | 65f14d23c88be3ae02547952d8e3685d1fa670a2 | |
parent | ca96dd1a3fc7f9ef6747950130d594c7b80c4a22 (diff) | |
download | e2fsprogs-985b46c55070c62153587e5b18ecb5310706546c.tar.gz |
create_inode: do not fail if filesystem doesn't support xattr
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>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-rw-r--r-- | misc/create_inode.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/misc/create_inode.c b/misc/create_inode.c index c00d54588..d7ab1c20c 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); |