]> git.proxmox.com Git - mirror_ubuntu-bionic-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)
committerKhalid Elmously <khalid.elmously@canonical.com>
Fri, 14 Feb 2020 05:29:37 +0000 (00:29 -0500)
commit3b8aeec4ccc994bd24d73e88cf4296d9e30e977f
tree523092ef16b5d1a1d501b6de5821199a8f42129e
parentd40bcb77f86fb4a2f656f18036a90051aed22c4b
reiserfs: fix handling of -EOPNOTSUPP in reiserfs_for_each_xattr

BugLink: https://bugs.launchpad.net/bugs/1862259
commit 394440d469413fa9b74f88a11f144d76017221f2 upstream.

Commit 60e4cf67a58 (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: 60e4cf67a582 ("reiserfs: fix extended attributes on the root directory")
CC: stable@vger.kernel.org # Commit 60e4cf67a58 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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
fs/reiserfs/xattr.c