aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2021-11-12 13:26:46 -0800
committerJaegeuk Kim <jaegeuk@kernel.org>2021-11-12 13:26:46 -0800
commit972d71073af32a1854aeece018746a9f8021dd14 (patch)
tree2b74e0818e8bc687f896e3807079a5f684e8578f
parentf63551b9e4938f3e0ece4a60b5fb37fbff31972d (diff)
downloadf2fs-tools-972d71073af32a1854aeece018746a9f8021dd14.tar.gz
fsck.f2fs: do not assert if i_size is missing i_blocks in symlink
This case is not a bug, so we should fix seamlessly. Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
-rw-r--r--fsck/fsck.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/fsck/fsck.c b/fsck/fsck.c
index 0619519..ecd87af 100644
--- a/fsck/fsck.c
+++ b/fsck/fsck.c
@@ -1131,14 +1131,10 @@ skip_blkcnt_fix:
if (ftype == F2FS_FT_SYMLINK && i_size == 0 &&
i_blocks == (i_xattr_nid ? 3 : 2)) {
- ASSERT_MSG("ino: 0x%x i_blocks: %lu with zero i_size\n",
- nid, (unsigned long)i_blocks);
- if (c.fix_on) {
- node_blk->i.i_size = cpu_to_le64(F2FS_BLKSIZE);
- need_fix = 1;
- FIX_MSG("Symlink: recover 0x%x with i_size=%lu",
+ node_blk->i.i_size = cpu_to_le64(F2FS_BLKSIZE);
+ need_fix = 1;
+ FIX_MSG("Symlink: recover 0x%x with i_size=%lu",
nid, (unsigned long)F2FS_BLKSIZE);
- }
}
if (ftype == F2FS_FT_ORPHAN && i_links) {