projects
/
GitHub
/
MotorolaMobilityLLC
/
kernel-slsi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2a510c0
)
f2fs: add f2fs_bug_on in __remove_discard_cmd
author
Chao Yu
<yuchao0@huawei.com>
Mon, 5 Jun 2017 10:29:07 +0000
(18:29 +0800)
committer
Jaegeuk Kim
<jaegeuk@kernel.org>
Tue, 4 Jul 2017 09:11:37 +0000
(
02:11
-0700)
Recently, discard related codes have changed a lot, so add f2fs_bug_on to
detect potential bug.
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/segment.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/f2fs/segment.c
b/fs/f2fs/segment.c
index 0fa717a473948717bae6faff5f9eab7e433c1342..86a0c1095939c5fe841d367d4a2aa9f9ff83cbe8 100644
(file)
--- a/
fs/f2fs/segment.c
+++ b/
fs/f2fs/segment.c
@@
-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;