f2fs: detect bug_on in f2fs_wait_discard_bios
Add bug_on to detect potential non-empty discard wait list. Signed-off-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
parent
648f2564d4
commit
c13d317593
1 changed files with 2 additions and 0 deletions
|
@ -1468,6 +1468,8 @@ bool f2fs_wait_discard_bios(struct f2fs_sb_info *sbi)
|
||||||
|
|
||||||
/* just to make sure there is no pending discard commands */
|
/* just to make sure there is no pending discard commands */
|
||||||
__wait_all_discard_cmd(sbi, NULL);
|
__wait_all_discard_cmd(sbi, NULL);
|
||||||
|
|
||||||
|
f2fs_bug_on(sbi, atomic_read(&dcc->discard_cmd_cnt));
|
||||||
return dropped;
|
return dropped;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue