From: Chao Yu Date: Mon, 5 Jun 2017 10:29:07 +0000 (+0800) Subject: f2fs: add f2fs_bug_on in __remove_discard_cmd X-Git-Tag: MMI-PSA29.97-13-9~5194^2~29 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d9703d9097d7c97f735a3b7870c52735a4dfa051;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git f2fs: add f2fs_bug_on in __remove_discard_cmd Recently, discard related codes have changed a lot, so add f2fs_bug_on to detect potential bug. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim --- diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index 0fa717a47394..86a0c1095939 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -739,6 +739,8 @@ static void __remove_discard_cmd(struct f2fs_sb_info *sbi, { struct discard_cmd_control *dcc = SM_I(sbi)->dcc_info; + f2fs_bug_on(sbi, dc->ref); + if (dc->error == -EOPNOTSUPP) dc->error = 0;