Skip to content

Commit

Permalink
f2fs: detect bug_on in f2fs_wait_discard_bios
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Chao Yu authored and Jaegeuk Kim committed Aug 1, 2018
1 parent cb15d1e commit 2482c43
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fs/f2fs/segment.c
Original file line number Diff line number Diff line change
Expand Up @@ -1388,6 +1388,8 @@ bool f2fs_wait_discard_bios(struct f2fs_sb_info *sbi)

/* just to make sure there is no pending discard commands */
__wait_all_discard_cmd(sbi, NULL);

f2fs_bug_on(sbi, atomic_read(&dcc->discard_cmd_cnt));
return dropped;
}

Expand Down

0 comments on commit 2482c43

Please sign in to comment.