fsck.f2fs: fix to avoid assert in do_record_fsync_data()

As Kane Ch'in reported in bugzilla [1]

I am using some Debian VMs with f2fs root partition for development.
My host machine crashed for some reason and this caused the f2fs
partitions in the VMs to become corrupted. I tried to boot from Debian
Live and repair the partitions but failed.

do_record_fsync_data: [node] ino = 24573, nid = 0, blkaddr = 2063580
recover_data: ino = 24573, nid = 0, recorded = 0, err = 0
do_record_fsync_data: [node] ino = 471286, nid = 0, blkaddr = 2063581
recover_data: ino = 471286, nid = 0, recorded = 0, err = 0
[ASSERT] (do_record_fsync_data:3475) 0

During do_record_fsync_data(), if dnode in warm node chain is valid in
SIT table, it's better to continue checking rather than triggering
assert().

[1] https://bugzilla.kernel.org/show_bug.cgi?id=218349

Reported-by: Kane Ch'in <qinfd2023@lzu.edu.cn>
Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
1 file changed