diff options
author | Eric Sesterhenn <snakebyte@gmx.de> | 2006-10-03 17:33:23 -0400 |
---|---|---|
committer | Adrian Bunk <bunk@stusta.de> | 2006-10-03 17:33:23 -0400 |
commit | 52e5f9d1cf0b10b24317037dcd1c9be38ca7011c (patch) | |
tree | a0646ee04b91d5d195075dc4ad8d38cf603179d8 | |
parent | 70d63ccc71fe1a413ce82b88aa175b1dcf28654e (diff) |
BUG_ON cleanup for drivers/md/
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>
-rw-r--r-- | drivers/md/md.c | 3 | ||||
-rw-r--r-- | drivers/md/raid5.c | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index 38a0a5741d52..cb8281605be8 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c | |||
@@ -4438,8 +4438,7 @@ static int md_release(struct inode *inode, struct file * file) | |||
4438 | { | 4438 | { |
4439 | mddev_t *mddev = inode->i_bdev->bd_disk->private_data; | 4439 | mddev_t *mddev = inode->i_bdev->bd_disk->private_data; |
4440 | 4440 | ||
4441 | if (!mddev) | 4441 | BUG_ON(!mddev); |
4442 | BUG(); | ||
4443 | mddev_put(mddev); | 4442 | mddev_put(mddev); |
4444 | 4443 | ||
4445 | return 0; | 4444 | return 0; |
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index 37e4ff661b6c..e14f45780720 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c | |||
@@ -1105,7 +1105,7 @@ static void compute_parity6(struct stripe_head *sh, int method) | |||
1105 | if (test_and_clear_bit(R5_Overlap, &sh->dev[i].flags)) | 1105 | if (test_and_clear_bit(R5_Overlap, &sh->dev[i].flags)) |
1106 | wake_up(&conf->wait_for_overlap); | 1106 | wake_up(&conf->wait_for_overlap); |
1107 | 1107 | ||
1108 | if (sh->dev[i].written) BUG(); | 1108 | BUG_ON(sh->dev[i].written); |
1109 | sh->dev[i].written = chosen; | 1109 | sh->dev[i].written = chosen; |
1110 | } | 1110 | } |
1111 | break; | 1111 | break; |