diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index dc33b4e5c07b..9e6c4a475d6d 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -3698,8 +3698,8 @@ void f2fs_do_replace_block(struct f2fs_sb_info *sbi, struct f2fs_summary *sum, } } - f2fs_bug_on(sbi, !IS_DATASEG(type)); curseg = CURSEG_I(sbi, type); + f2fs_bug_on(sbi, !IS_DATASEG(curseg->seg_type)); mutex_lock(&curseg->curseg_mutex); down_write(&sit_i->sentry_lock);