aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
authorEric Sesterhenn <snakebyte@gmx.de>2006-03-31 18:08:49 -0500
committerAdrian Bunk <bunk@stusta.de>2006-03-31 18:08:49 -0500
commit9e77c485f7037e4817bb53c78d15d5403981ae8b (patch)
tree1b9b5bc14576c51ae03daf46b003869497499719 /drivers/md
parent543cb2a451918002238a052d5c280e6afdee1cea (diff)
BUG_ON() Conversion in md/raid1.c
this changes if() BUG(); constructs to BUG_ON() which is cleaner and can better optimized away Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de> Signed-off-by: Adrian Bunk <bunk@stusta.de>
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/raid1.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
index 9b374c91db66..6081941de1b3 100644
--- a/drivers/md/raid1.c
+++ b/drivers/md/raid1.c
@@ -1558,8 +1558,7 @@ static int init_resync(conf_t *conf)
1558 int buffs; 1558 int buffs;
1559 1559
1560 buffs = RESYNC_WINDOW / RESYNC_BLOCK_SIZE; 1560 buffs = RESYNC_WINDOW / RESYNC_BLOCK_SIZE;
1561 if (conf->r1buf_pool) 1561 BUG_ON(conf->r1buf_pool);
1562 BUG();
1563 conf->r1buf_pool = mempool_create(buffs, r1buf_pool_alloc, r1buf_pool_free, 1562 conf->r1buf_pool = mempool_create(buffs, r1buf_pool_alloc, r1buf_pool_free,
1564 conf->poolinfo); 1563 conf->poolinfo);
1565 if (!conf->r1buf_pool) 1564 if (!conf->r1buf_pool)
@@ -1732,8 +1731,7 @@ static sector_t sync_request(mddev_t *mddev, sector_t sector_nr, int *skipped, i
1732 !conf->fullsync && 1731 !conf->fullsync &&
1733 !test_bit(MD_RECOVERY_REQUESTED, &mddev->recovery)) 1732 !test_bit(MD_RECOVERY_REQUESTED, &mddev->recovery))
1734 break; 1733 break;
1735 if (sync_blocks < (PAGE_SIZE>>9)) 1734 BUG_ON(sync_blocks < (PAGE_SIZE>>9));
1736 BUG();
1737 if (len > (sync_blocks<<9)) 1735 if (len > (sync_blocks<<9))
1738 len = sync_blocks<<9; 1736 len = sync_blocks<<9;
1739 } 1737 }