ext4: correct max_inline_xattr_value_size computing
authorBaokun Li <libaokun1@huawei.com>
Thu, 16 Jun 2022 02:13:57 +0000 (10:13 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Aug 2022 09:11:28 +0000 (11:11 +0200)
commit48b5a08e9fa285b1e8fb7ca154629904c37dcd95
tree8727889706e817fffb4b19672b266aa2cf2ca7a4
parent02f1637ba4181e272430a03e976f55f06f0bda40
ext4: correct max_inline_xattr_value_size computing

commit c9fd167d57133c5b748d16913c4eabc55e531c73 upstream.

If the ext4 inode does not have xattr space, 0 is returned in the
get_max_inline_xattr_value_size function. Otherwise, the function returns
a negative value when the inode does not contain EXT4_STATE_XATTR.

Cc: stable@kernel.org
Signed-off-by: Baokun Li <libaokun1@huawei.com>
Reviewed-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20220616021358.2504451-4-libaokun1@huawei.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ext4/inline.c