summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/segment.c
diff options
context:
space:
mode:
authorChao Yu <yuchao0@huawei.com>2018-07-08 16:16:53 +0200
committerJaegeuk Kim <jaegeuk@kernel.org>2018-08-01 20:52:36 +0200
commit2482c4325dfe03b679a8bd7e0f1d14e230f019b3 (patch)
treea77f836cd1039ddde7feb732ce0b78414feb1eea /fs/f2fs/segment.c
parentf2fs: fix defined but not used build warnings (diff)
downloadlinux-2482c4325dfe03b679a8bd7e0f1d14e230f019b3.tar.xz
linux-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 '')
-rw-r--r--fs/f2fs/segment.c2
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;
}