ext4: explicitly exit when ext4_find_inline_entry returns an error
authorThadeu Lima de Souza Cascardo <cascardo@igalia.com>
Wed, 21 Aug 2024 15:23:23 +0000 (12:23 -0300)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 4 Sep 2024 02:12:16 +0000 (22:12 -0400)
commit51e14e78b5fb3e6f839393cd2d34386ee7b69af3
treeee8e5754ea516875fd7c74e6ff3d4741c282e12b
parent4d231b91a944f3cab355fce65af5871fb5d7735b
ext4: explicitly exit when ext4_find_inline_entry returns an error

__ext4_find_entry currently ignores the return of ext4_find_inline_entry,
except for returning the bh or NULL when has_inline_data is 1.

Even though has_inline_data is set to 1 before calling
ext4_find_inline_entry and would only be set to 0 when that function
returns NULL, check for an encoded error return explicitly in order to
exit.

That makes the code more readable, not requiring that one assumes the cases
when has_inline_data is 1.

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@igalia.com>
Link: https://patch.msgid.link/20240821152324.3621860-4-cascardo@igalia.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/namei.c