ext4: fix potential htree corruption when growing large_dir directories
authorTheodore Ts'o <tytso@mit.edu>
Wed, 4 Aug 2021 18:23:55 +0000 (14:23 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 15 Aug 2021 11:03:31 +0000 (13:03 +0200)
commitdb97d2f3720a8f0fd1bee4d0c0f904a8eb58ffaa
tree91a2fa4d3cb2c13fbc663892af21deeac84b937f
parentd346d23d68ed0adcbddb23e8342aaa5c470b929a
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>
fs/ext4/namei.c