mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 00:00:52 +07:00
ext4: fix potential htree corruption when growing large_dir directories
commit 877ba3f729fd3d8ef0e29bc2a55e57cfa54b2e43 upstream. Commit b5776e7524af ("ext4: fix potential htree index checksum corruption) removed a required restart when multiple levels of index nodes need to be split. Fix this to avoid directory htree corruptions when using the large_dir feature. Cc: stable@kernel.org # v5.11 Cc: Благодаренко Артём <artem.blagodarenko@gmail.com> Fixes: b5776e7524af ("ext4: fix potential htree index checksum corruption) Reported-by: Denis <denis@voxelsoft.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
20bfab1a3d
commit
0b6bc338a9
@ -2602,7 +2602,7 @@ static int ext4_dx_add_entry(handle_t *handle, struct ext4_filename *fname,
|
||||
goto journal_error;
|
||||
err = ext4_handle_dirty_dx_node(handle, dir,
|
||||
frame->bh);
|
||||
if (err)
|
||||
if (restart || err)
|
||||
goto journal_error;
|
||||
} else {
|
||||
struct dx_root *dxroot;
|
||||
|
Loading…
Reference in New Issue
Block a user