]> git.proxmox.com Git - mirror_ubuntu-eoan-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 06:00:53 +0000 (01:00 -0500)
commitb58ade4dd8a4603ee52a9ebc9854557d7c6cab11
tree37fd046bde3c9cf552d9bd79874a0c57926cce1d
parent9bee1def4392f2b3c8b03404d2f2c03d234c1ab9
reiserfs: fix handling of -EOPNOTSUPP in reiserfs_for_each_xattr

BugLink: https://bugs.launchpad.net/bugs/1862429
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