diff options
author | Chao Yu <yuchao0@huawei.com> | 2018-07-08 22:16:53 +0800 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2018-08-01 11:52:36 -0700 |
commit | 2482c4325dfe03b679a8bd7e0f1d14e230f019b3 (patch) | |
tree | a77f836cd1039ddde7feb732ce0b78414feb1eea /fs/f2fs/segment.c | |
parent | cb15d1e43db0a6341c1e26ac6a2c74e61b74f1aa (diff) | |
download | linux-stable-2482c4325dfe03b679a8bd7e0f1d14e230f019b3.tar.gz linux-stable-2482c4325dfe03b679a8bd7e0f1d14e230f019b3.tar.bz2 linux-stable-2482c4325dfe03b679a8bd7e0f1d14e230f019b3.zip |
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>
Diffstat (limited to 'fs/f2fs/segment.c')
-rw-r--r-- | fs/f2fs/segment.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index 47b6595a078c..199a77a9c4a9 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -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; } |