diff options
author | zhangyi (F) <yi.zhang@huawei.com> | 2021-03-03 21:17:02 +0800 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2021-03-21 00:03:39 -0400 |
commit | b7ff91fd030dc9d72ed91b1aab36e445a003af4f (patch) | |
tree | 7015e62beaf3916d42cec195a5e137ec2e4c7ff6 /fs/ext4/inode.c | |
parent | f053cf7aa66cd9d592b0fc967f4d887c2abff1b7 (diff) | |
download | linux-b7ff91fd030dc9d72ed91b1aab36e445a003af4f.tar.gz linux-b7ff91fd030dc9d72ed91b1aab36e445a003af4f.tar.bz2 linux-b7ff91fd030dc9d72ed91b1aab36e445a003af4f.zip |
ext4: find old entry again if failed to rename whiteout
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>
Diffstat (limited to 'fs/ext4/inode.c')
0 files changed, 0 insertions, 0 deletions