From: HIMANGI SARAOGI Date: Tue, 8 Jul 2014 22:21:41 +0000 (+0530) Subject: Btrfs: use BUG_ON X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=14586651ed8f067e4add72c739f0bd2c2620fd9d;p=linux-beck.git Btrfs: use BUG_ON Use BUG_ON(x) rather than if(x) BUG(); The semantic patch that fixes this problem is as follows: // @@ identifier x; @@ -if (x) BUG(); +BUG_ON(x); // Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall Signed-off-by: Chris Mason --- 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: found_key.offset); if (ret == -ENOSPC) failed++; - else if (ret) - BUG(); + else + BUG_ON(ret); } if (found_key.offset == 0)