Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 14586651 authored by HIMANGI SARAOGI's avatar HIMANGI SARAOGI Committed by Chris Mason
Browse files

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: default avatarHimangi Saraogi <himangi774@gmail.com>
Acked-by: default avatarJulia Lawall <julia.lawall@lip6.fr>
Signed-off-by: default avatarChris Mason <clm@fb.com>
parent 78809913
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -2677,8 +2677,8 @@ static int btrfs_relocate_sys_chunks(struct btrfs_root *root)
						   found_key.offset);
			if (ret == -ENOSPC)
				failed++;
			else if (ret)
				BUG();
			else
				BUG_ON(ret);
		}

		if (found_key.offset == 0)