OSDN Git Service
(root)
/
sagit-ice-cold
/
kernel_xiaomi_msm8998.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4798bcc
)
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>
Thu, 13 Jul 2017 23:56:37 +0000
(16:56 -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
|
history
diff --git
a/fs/f2fs/segment.c
b/fs/f2fs/segment.c
index
e10d4e5
..
9b08a66
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;