]> err.no Git - linux-2.6/commitdiff
BUG_ON cleanup for drivers/md/
authorEric Sesterhenn <snakebyte@gmx.de>
Tue, 3 Oct 2006 21:33:23 +0000 (23:33 +0200)
committerAdrian Bunk <bunk@stusta.de>
Tue, 3 Oct 2006 21:33:23 +0000 (23:33 +0200)
This changes two if() BUG(); usages to BUG_ON(); so people
can disable it safely.

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
drivers/md/md.c
drivers/md/raid5.c

index 38a0a5741d526cc4491a2c76dbdfe786ac58f0d5..cb8281605be8f7d23bbd0769309268b5f69d7c1a 100644 (file)
@@ -4438,8 +4438,7 @@ static int md_release(struct inode *inode, struct file * file)
 {
        mddev_t *mddev = inode->i_bdev->bd_disk->private_data;
 
-       if (!mddev)
-               BUG();
+       BUG_ON(!mddev);
        mddev_put(mddev);
 
        return 0;
index 37e4ff661b6cce263148fe7f28d1a6be719b0244..e14f4578072006e3b464668d3c8500187df76453 100644 (file)
@@ -1105,7 +1105,7 @@ static void compute_parity6(struct stripe_head *sh, int method)
                                if (test_and_clear_bit(R5_Overlap, &sh->dev[i].flags))
                                        wake_up(&conf->wait_for_overlap);
 
-                               if (sh->dev[i].written) BUG();
+                               BUG_ON(sh->dev[i].written);
                                sh->dev[i].written = chosen;
                        }
                break;