]> git.baikalelectronics.ru Git - kernel.git/commit
reiserfs: fix handling of -EOPNOTSUPP in reiserfs_for_each_xattr
authorJeff Mahoney <jeffm@suse.com>
Wed, 15 Jan 2020 18:00:59 +0000 (13:00 -0500)
committerJan Kara <jack@suse.cz>
Thu, 16 Jan 2020 15:49:29 +0000 (16:49 +0100)
commit2aabd90858c225793c2f071cb890c004a852e408
treeaa4036c11f17a01f05e09dbc635cec0061d1cc82
parentd4f46b330cc523efd6fb99dfb35e4def34bd935c
reiserfs: fix handling of -EOPNOTSUPP in reiserfs_for_each_xattr

Commit 26b008d4983 (reiserfs: fix extended attributes on the root
directory) introduced a regression open_xa_root started returning
-EOPNOTSUPP but it was not handled properly in reiserfs_for_each_xattr.

When the reiserfs module is built without CONFIG_REISERFS_FS_XATTR,
deleting an inode would result in a warning and chowning an inode
would also result in a warning and then fail to complete.

With CONFIG_REISERFS_FS_XATTR enabled, the xattr root would always be
present for read-write operations.

This commit handles -EOPNOSUPP in the same way -ENODATA is handled.

Fixes: 26b008d49837 ("reiserfs: fix extended attributes on the root directory")
CC: stable@vger.kernel.org # Commit 26b008d4983 was picked up by stable
Link: https://lore.kernel.org/r/20200115180059.6935-1-jeffm@suse.com
Reported-by: Michael Brunnbauer <brunni@netestate.de>
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Jan Kara <jack@suse.cz>
fs/reiserfs/xattr.c