From: HIMANGI SARAOGI Date: Tue, 8 Jul 2014 22:21:41 +0000 (+0530) Subject: Btrfs: use BUG_ON X-Git-Tag: v5.15~16838^2~107 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=14586651ed8f067e4add72c739f0bd2c2620fd9d;p=platform%2Fkernel%2Flinux-starfive.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 48c3572..7f25ff1 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)