mirror of
https://gitee.com/openharmony/third_party_f2fs-tools
synced 2024-11-23 10:10:00 +00:00
fsck.f2fs: do not assert if i_size is missing i_blocks in symlink
commit 972d71073a
category: bugfix
issue: #I6VAS0
CVE: NA
Signed-off-by: DongSenhao <dongsenhao2@huawei.com>
---------------------------------------
This case is not a bug, so we should fix seamlessly.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: dongsenhao <dongsenhao2@huawei.com>
This commit is contained in:
parent
ad306b1a97
commit
5e675d7745
10
fsck/fsck.c
10
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) {
|
||||
|
Loading…
Reference in New Issue
Block a user