Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d9703d90 authored by Chao Yu's avatar Chao Yu Committed by Jaegeuk Kim
Browse files

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: default avatarChao Yu <yuchao0@huawei.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent 2a510c00
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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;