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>
This commit is contained in:
HIMANGI SARAOGI 2014-07-09 03:51:41 +05:30 committed by Chris Mason
parent 7880991344
commit 14586651ed

View File

@ -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)