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:
parent
7880991344
commit
14586651ed
|
@ -2677,8 +2677,8 @@ again:
|
||||||
found_key.offset);
|
found_key.offset);
|
||||||
if (ret == -ENOSPC)
|
if (ret == -ENOSPC)
|
||||||
failed++;
|
failed++;
|
||||||
else if (ret)
|
else
|
||||||
BUG();
|
BUG_ON(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (found_key.offset == 0)
|
if (found_key.offset == 0)
|
||||||
|
|
Loading…
Reference in New Issue