diff options
Diffstat (limited to 'drivers/md/raid5.c')
-rw-r--r-- | drivers/md/raid5.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index 54c8ee28fcc4..214b44122822 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c | |||
@@ -115,9 +115,7 @@ static void return_io(struct bio *return_bi) | |||
115 | return_bi = bi->bi_next; | 115 | return_bi = bi->bi_next; |
116 | bi->bi_next = NULL; | 116 | bi->bi_next = NULL; |
117 | bi->bi_size = 0; | 117 | bi->bi_size = 0; |
118 | bi->bi_end_io(bi, | 118 | bio_endio(bi, 0); |
119 | test_bit(BIO_UPTODATE, &bi->bi_flags) | ||
120 | ? 0 : -EIO); | ||
121 | bi = return_bi; | 119 | bi = return_bi; |
122 | } | 120 | } |
123 | } | 121 | } |
@@ -3700,9 +3698,7 @@ static int make_request(struct request_queue *q, struct bio * bi) | |||
3700 | if ( rw == WRITE ) | 3698 | if ( rw == WRITE ) |
3701 | md_write_end(mddev); | 3699 | md_write_end(mddev); |
3702 | 3700 | ||
3703 | bi->bi_end_io(bi, | 3701 | bio_endio(bi, 0); |
3704 | test_bit(BIO_UPTODATE, &bi->bi_flags) | ||
3705 | ? 0 : -EIO); | ||
3706 | } | 3702 | } |
3707 | return 0; | 3703 | return 0; |
3708 | } | 3704 | } |
@@ -4005,12 +4001,8 @@ static int retry_aligned_read(raid5_conf_t *conf, struct bio *raid_bio) | |||
4005 | spin_lock_irq(&conf->device_lock); | 4001 | spin_lock_irq(&conf->device_lock); |
4006 | remaining = --raid_bio->bi_phys_segments; | 4002 | remaining = --raid_bio->bi_phys_segments; |
4007 | spin_unlock_irq(&conf->device_lock); | 4003 | spin_unlock_irq(&conf->device_lock); |
4008 | if (remaining == 0) { | 4004 | if (remaining == 0) |
4009 | 4005 | bio_endio(raid_bio, 0); | |
4010 | raid_bio->bi_end_io(raid_bio, | ||
4011 | test_bit(BIO_UPTODATE, &raid_bio->bi_flags) | ||
4012 | ? 0 : -EIO); | ||
4013 | } | ||
4014 | if (atomic_dec_and_test(&conf->active_aligned_reads)) | 4006 | if (atomic_dec_and_test(&conf->active_aligned_reads)) |
4015 | wake_up(&conf->wait_for_stripe); | 4007 | wake_up(&conf->wait_for_stripe); |
4016 | return handled; | 4008 | return handled; |