Skip to content

Commit 877ba3f

Browse files
committed
ext4: fix potential htree corruption when growing large_dir directories
Commit b5776e7 ("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: [email protected] # v5.11 Cc: Благодаренко Артём <[email protected]> Fixes: b5776e7 ("ext4: fix potential htree index checksum corruption) Reported-by: Denis <[email protected]> Signed-off-by: Theodore Ts'o <[email protected]>
1 parent 73dc707 commit 877ba3f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/ext4/namei.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2517,7 +2517,7 @@ static int ext4_dx_add_entry(handle_t *handle, struct ext4_filename *fname,
25172517
goto journal_error;
25182518
err = ext4_handle_dirty_dx_node(handle, dir,
25192519
frame->bh);
2520-
if (err)
2520+
if (restart || err)
25212521
goto journal_error;
25222522
} else {
25232523
struct dx_root *dxroot;

0 commit comments

Comments
 (0)