Files
android_kernel_xiaomi_sm8450/fs/ext4
zhangyi (F) 258db8e6ff ext4: find old entry again if failed to rename whiteout
commit b7ff91fd030dc9d72ed91b1aab36e445a003af4f upstream.

If we failed to add new entry on rename whiteout, we cannot reset the
old->de entry directly, because the old->de could have moved from under
us during make indexed dir. So find the old entry again before reset is
needed, otherwise it may corrupt the filesystem as below.

  /dev/sda: Entry '00000001' in ??? (12) has deleted/unused inode 15. CLEARED.
  /dev/sda: Unattached inode 75
  /dev/sda: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.

Fixes: 6b4b8e6b4ad ("ext4: fix bug for rename with RENAME_WHITEOUT")
Cc: stable@vger.kernel.org
Signed-off-by: zhangyi (F) <yi.zhang@huawei.com>
Link: https://lore.kernel.org/r/20210303131703.330415-1-yi.zhang@huawei.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-25 09:04:17 +01:00
..
2020-10-21 23:22:37 -04:00
2020-10-21 23:22:38 -04:00
2020-10-28 13:43:13 -04:00
2020-10-21 23:22:38 -04:00
2020-12-30 11:54:13 +01:00
2021-01-19 18:27:22 +01:00
2020-10-28 13:43:13 -04:00
2020-07-08 10:29:43 -07:00
2020-10-21 23:22:37 -04:00