mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-04 04:06:26 +00:00
f2fs: fix the wrong f2fs_bug_on condition in f2fs_do_replace_block
This f2fs_bug_on was introduced by commit2c1905042c
("f2fs: check segment type in __f2fs_replace_block") when there were only 6 curseg types. After commitd0b9e42ab6
("f2fs: introduce inmem curseg") was introduced, the condition should be changed to checking curseg->seg_type. Fixes:d0b9e42ab6
("f2fs: introduce inmem curseg") Signed-off-by: LongPing Wei <weilongping@oppo.com> Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
parent
5bc5aae843
commit
c3af1f1347
@ -3978,8 +3978,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);
|
||||
|
Loading…
Reference in New Issue
Block a user