Message ID | 20231025085657.11689-1-kazunori.kobayashi@miraclelinux.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | [f2fs-dev,5.10] f2fs: fix to do sanity check on inode type during garbage collection | expand |
diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index 8e4daee0171f..dfa99cd195b8 100644 --- a/fs/f2fs/gc.c +++ b/fs/f2fs/gc.c @@ -1451,7 +1451,8 @@ static int gc_data_segment(struct f2fs_sb_info *sbi, struct f2fs_summary *sum, if (phase == 3) { inode = f2fs_iget(sb, dni.ino); - if (IS_ERR(inode) || is_bad_inode(inode)) { + if (IS_ERR(inode) || is_bad_inode(inode) || + special_file(inode->i_mode)) { set_sbi_flag(sbi, SBI_NEED_FSCK); continue; }