Skip to content

Commit c3af1f1

Browse files
LongPing WeiJaegeuk Kim
authored andcommitted
f2fs: fix the wrong f2fs_bug_on condition in f2fs_do_replace_block
This f2fs_bug_on was introduced by commit 2c19050 ("f2fs: check segment type in __f2fs_replace_block") when there were only 6 curseg types. After commit d0b9e42 ("f2fs: introduce inmem curseg") was introduced, the condition should be changed to checking curseg->seg_type. Fixes: d0b9e42 ("f2fs: introduce inmem curseg") Signed-off-by: LongPing Wei <[email protected]> Reviewed-by: Chao Yu <[email protected]> Signed-off-by: Jaegeuk Kim <[email protected]>
1 parent 5bc5aae commit c3af1f1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/f2fs/segment.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3978,8 +3978,8 @@ void f2fs_do_replace_block(struct f2fs_sb_info *sbi, struct f2fs_summary *sum,
39783978
}
39793979
}
39803980

3981-
f2fs_bug_on(sbi, !IS_DATASEG(type));
39823981
curseg = CURSEG_I(sbi, type);
3982+
f2fs_bug_on(sbi, !IS_DATASEG(curseg->seg_type));
39833983

39843984
mutex_lock(&curseg->curseg_mutex);
39853985
down_write(&sit_i->sentry_lock);

0 commit comments

Comments
 (0)