mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-05 00:20:32 +00:00
reiserfs: fix handling of -EOPNOTSUPP in reiserfs_for_each_xattr
commit394440d469
upstream. Commit60e4cf67a5
(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:60e4cf67a5
("reiserfs: fix extended attributes on the root directory") CC: stable@vger.kernel.org # Commit60e4cf67a5
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>
This commit is contained in:
parent
7b88ac5047
commit
d28d607908
1 changed files with 6 additions and 2 deletions
|
@ -319,8 +319,12 @@ static int reiserfs_for_each_xattr(struct inode *inode,
|
|||
out_dir:
|
||||
dput(dir);
|
||||
out:
|
||||
/* -ENODATA isn't an error */
|
||||
if (err == -ENODATA)
|
||||
/*
|
||||
* -ENODATA: this object doesn't have any xattrs
|
||||
* -EOPNOTSUPP: this file system doesn't have xattrs enabled on disk.
|
||||
* Neither are errors
|
||||
*/
|
||||
if (err == -ENODATA || err == -EOPNOTSUPP)
|
||||
err = 0;
|
||||
return err;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue