Message ID | 20241001164952.58114-5-massimiliano.pellizzer@canonical.com |
---|---|
State | New |
Headers | show |
Series | None | expand |
diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index 9a57754e6e0c..8d58edfba293 100644 --- a/fs/f2fs/gc.c +++ b/fs/f2fs/gc.c @@ -1479,6 +1479,16 @@ static int gc_data_segment(struct f2fs_sb_info *sbi, struct f2fs_summary *sum, special_file(inode->i_mode)) continue; + if (f2fs_has_inline_data(inode)) { + iput(inode); + set_sbi_flag(sbi, SBI_NEED_FSCK); + f2fs_err_ratelimited(sbi, + "inode %lx has both inline_data flag and " + "data block, nid=%u, ofs_in_node=%u", + inode->i_ino, dni.nid, ofs_in_node); + continue; + } + if (!down_write_trylock( &F2FS_I(inode)->i_gc_rwsem[WRITE])) { iput(inode);