diff options
Diffstat (limited to 'drivers/md/linear.c')
-rw-r--r-- | drivers/md/linear.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/md/linear.c b/drivers/md/linear.c index b1eebf88c209..b9cbee688fae 100644 --- a/drivers/md/linear.c +++ b/drivers/md/linear.c | |||
@@ -318,14 +318,18 @@ static int linear_make_request (struct request_queue *q, struct bio *bio) | |||
318 | mddev_t *mddev = q->queuedata; | 318 | mddev_t *mddev = q->queuedata; |
319 | dev_info_t *tmp_dev; | 319 | dev_info_t *tmp_dev; |
320 | sector_t block; | 320 | sector_t block; |
321 | int cpu; | ||
321 | 322 | ||
322 | if (unlikely(bio_barrier(bio))) { | 323 | if (unlikely(bio_barrier(bio))) { |
323 | bio_endio(bio, -EOPNOTSUPP); | 324 | bio_endio(bio, -EOPNOTSUPP); |
324 | return 0; | 325 | return 0; |
325 | } | 326 | } |
326 | 327 | ||
327 | disk_stat_inc(mddev->gendisk, ios[rw]); | 328 | cpu = part_stat_lock(); |
328 | disk_stat_add(mddev->gendisk, sectors[rw], bio_sectors(bio)); | 329 | part_stat_inc(cpu, &mddev->gendisk->part0, ios[rw]); |
330 | part_stat_add(cpu, &mddev->gendisk->part0, sectors[rw], | ||
331 | bio_sectors(bio)); | ||
332 | part_stat_unlock(); | ||
329 | 333 | ||
330 | tmp_dev = which_dev(mddev, bio->bi_sector); | 334 | tmp_dev = which_dev(mddev, bio->bi_sector); |
331 | block = bio->bi_sector >> 1; | 335 | block = bio->bi_sector >> 1; |
@@ -349,7 +353,7 @@ static int linear_make_request (struct request_queue *q, struct bio *bio) | |||
349 | * split it. | 353 | * split it. |
350 | */ | 354 | */ |
351 | struct bio_pair *bp; | 355 | struct bio_pair *bp; |
352 | bp = bio_split(bio, bio_split_pool, | 356 | bp = bio_split(bio, |
353 | ((tmp_dev->offset + tmp_dev->size)<<1) - bio->bi_sector); | 357 | ((tmp_dev->offset + tmp_dev->size)<<1) - bio->bi_sector); |
354 | if (linear_make_request(q, &bp->bio1)) | 358 | if (linear_make_request(q, &bp->bio1)) |
355 | generic_make_request(&bp->bio1); | 359 | generic_make_request(&bp->bio1); |