X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=drivers%2Fmd%2Fraid10.c;h=617012bc107a0205c597890d5167f03d86c45475;hb=d1a667892658259aab52d9968571abd9efbc59a1;hp=ab90a6d1202043f7d332fe5f613be414845f1107;hpb=8f75015f33c3005e0bbf83ffc0d5e0b4262cc03d;p=powerpc.git diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c index ab90a6d120..617012bc10 100644 --- a/drivers/md/raid10.c +++ b/drivers/md/raid10.c @@ -1117,8 +1117,7 @@ static int end_sync_read(struct bio *bio, unsigned int bytes_done, int error) for (i=0; icopies; i++) if (r10_bio->devs[i].bio == bio) break; - if (i == conf->copies) - BUG(); + BUG_ON(i == conf->copies); update_head_pos(i, r10_bio); d = r10_bio->devs[i].devnum; @@ -1518,8 +1517,7 @@ static int init_resync(conf_t *conf) int buffs; buffs = RESYNC_WINDOW / RESYNC_BLOCK_SIZE; - if (conf->r10buf_pool) - BUG(); + BUG_ON(conf->r10buf_pool); conf->r10buf_pool = mempool_create(buffs, r10buf_pool_alloc, r10buf_pool_free, conf); if (!conf->r10buf_pool) return -ENOMEM;