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>
Thu, 12 Aug 2021 11:22:14 +0000 (13:22 +0200)
commitcc7300776808de742101b64d84c6445e98ec72fb
tree1b85cff658bc3ef8d57a2e654447f289e979d2c6
parent6b5a3d2c2b89de999eaed8f81f54181734375966
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