aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/faulty.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2007-09-27 06:47:43 -0400
committerJens Axboe <axboe@carl.home.kernel.dk>2007-10-10 03:25:57 -0400
commit6712ecf8f648118c3363c142196418f89a510b90 (patch)
tree347d39a7d5a7ed96d3b1afecd28de2a0f98b98c9 /drivers/md/faulty.c
parent5bb23a688b2de23d7765a1dd439d89c038378978 (diff)
Drop 'size' argument from bio_endio and bi_end_io
As bi_end_io is only called once when the reqeust is complete, the 'size' argument is now redundant. Remove it. Now there is no need for bio_endio to subtract the size completed from bi_size. So don't do that either. While we are at it, change bi_end_io to return void. Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'drivers/md/faulty.c')
-rw-r--r--drivers/md/faulty.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/md/faulty.c b/drivers/md/faulty.c
index cb059cf14c2e..cf2ddce34118 100644
--- a/drivers/md/faulty.c
+++ b/drivers/md/faulty.c
@@ -65,18 +65,16 @@
65#include <linux/raid/md.h> 65#include <linux/raid/md.h>
66 66
67 67
68static int faulty_fail(struct bio *bio, unsigned int bytes_done, int error) 68static void faulty_fail(struct bio *bio, int error)
69{ 69{
70 struct bio *b = bio->bi_private; 70 struct bio *b = bio->bi_private;
71 71
72 b->bi_size = bio->bi_size; 72 b->bi_size = bio->bi_size;
73 b->bi_sector = bio->bi_sector; 73 b->bi_sector = bio->bi_sector;
74 74
75 if (bio->bi_size == 0) 75 bio_put(bio);
76 bio_put(bio);
77 76
78 clear_bit(BIO_UPTODATE, &b->bi_flags); 77 bio_io_error(b);
79 return (b->bi_end_io)(b, bytes_done, -EIO);
80} 78}
81 79
82typedef struct faulty_conf { 80typedef struct faulty_conf {
@@ -179,7 +177,7 @@ static int make_request(struct request_queue *q, struct bio *bio)
179 /* special case - don't decrement, don't generic_make_request, 177 /* special case - don't decrement, don't generic_make_request,
180 * just fail immediately 178 * just fail immediately
181 */ 179 */
182 bio_endio(bio, bio->bi_size, -EIO); 180 bio_endio(bio, -EIO);
183 return 0; 181 return 0;
184 } 182 }
185 183