diff options
author | HIMANGI SARAOGI <himangi774@gmail.com> | 2014-07-08 18:21:41 -0400 |
---|---|---|
committer | Chris Mason <clm@fb.com> | 2014-09-17 16:37:34 -0400 |
commit | 14586651ed8f067e4add72c739f0bd2c2620fd9d (patch) | |
tree | 929d439ac494d809c21ad1f490429806561cc725 /fs/btrfs | |
parent | 7880991344f73647fa2222b198cf5cfc10805ac2 (diff) |
Btrfs: use BUG_ON
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>
Diffstat (limited to 'fs/btrfs')
-rw-r--r-- | fs/btrfs/volumes.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 48c357223e56..7f25ff1c3854 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c | |||
@@ -2677,8 +2677,8 @@ again: | |||
2677 | found_key.offset); | 2677 | found_key.offset); |
2678 | if (ret == -ENOSPC) | 2678 | if (ret == -ENOSPC) |
2679 | failed++; | 2679 | failed++; |
2680 | else if (ret) | 2680 | else |
2681 | BUG(); | 2681 | BUG_ON(ret); |
2682 | } | 2682 | } |
2683 | 2683 | ||
2684 | if (found_key.offset == 0) | 2684 | if (found_key.offset == 0) |