projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7880991
)
Btrfs: use BUG_ON
author
HIMANGI SARAOGI
<himangi774@gmail.com>
Tue, 8 Jul 2014 22:21:41 +0000
(
03:51
+0530)
committer
Chris Mason
<clm@fb.com>
Wed, 17 Sep 2014 20:37:34 +0000
(13:37 -0700)
Use BUG_ON(x) rather than if(x) BUG();
The semantic patch that fixes this problem is as follows:
// <smpl>
@@ identifier x; @@
-if (x) BUG();
+BUG_ON(x);
// </smpl>
Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Chris Mason <clm@fb.com>
fs/btrfs/volumes.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/btrfs/volumes.c
b/fs/btrfs/volumes.c
index 48c357223e560436ff224e0d5d9e7f74cb8e561c..7f25ff1c3854fb5680c7f5456b3e81a369f8659e 100644
(file)
--- a/
fs/btrfs/volumes.c
+++ b/
fs/btrfs/volumes.c
@@
-2677,8
+2677,8
@@
again:
found_key.offset);
if (ret == -ENOSPC)
failed++;
- else
if (ret)
- BUG
(
);
+ else
+ BUG
_ON(ret
);
}
if (found_key.offset == 0)