]> git.baikalelectronics.ru Git - kernel.git/commit
ext4: avoid remove directory when directory is corrupted
authorYe Bin <yebin10@huawei.com>
Wed, 22 Jun 2022 09:02:23 +0000 (17:02 +0800)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 3 Aug 2022 03:56:17 +0000 (23:56 -0400)
commitf19909e500e08f270c10084b7f3a41a59bce9cbf
treee460fc768af3a33bd2f13825295f6bc51efeaff9
parent953b001062bba68e9160bfffc6c673f7a3315cdc
ext4: avoid remove directory when directory is corrupted

Now if check directoy entry is corrupted, ext4_empty_dir may return true
then directory will be removed when file system mounted with "errors=continue".
In order not to make things worse just return false when directory is corrupted.

Signed-off-by: Ye Bin <yebin10@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20220622090223.682234-1-yebin10@huawei.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/namei.c