diff options
Diffstat (limited to 'drivers/md/raid0.c')
-rw-r--r-- | drivers/md/raid0.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/md/raid0.c b/drivers/md/raid0.c index 183610635661..e26030fa59ab 100644 --- a/drivers/md/raid0.c +++ b/drivers/md/raid0.c | |||
@@ -399,14 +399,17 @@ static int raid0_make_request (struct request_queue *q, struct bio *bio) | |||
399 | sector_t chunk; | 399 | sector_t chunk; |
400 | sector_t block, rsect; | 400 | sector_t block, rsect; |
401 | const int rw = bio_data_dir(bio); | 401 | const int rw = bio_data_dir(bio); |
402 | int cpu; | ||
402 | 403 | ||
403 | if (unlikely(bio_barrier(bio))) { | 404 | if (unlikely(bio_barrier(bio))) { |
404 | bio_endio(bio, -EOPNOTSUPP); | 405 | bio_endio(bio, -EOPNOTSUPP); |
405 | return 0; | 406 | return 0; |
406 | } | 407 | } |
407 | 408 | ||
408 | disk_stat_inc(mddev->gendisk, ios[rw]); | 409 | cpu = disk_stat_lock(); |
409 | disk_stat_add(mddev->gendisk, sectors[rw], bio_sectors(bio)); | 410 | disk_stat_inc(cpu, mddev->gendisk, ios[rw]); |
411 | disk_stat_add(cpu, mddev->gendisk, sectors[rw], bio_sectors(bio)); | ||
412 | disk_stat_unlock(); | ||
410 | 413 | ||
411 | chunk_size = mddev->chunk_size >> 10; | 414 | chunk_size = mddev->chunk_size >> 10; |
412 | chunk_sects = mddev->chunk_size >> 9; | 415 | chunk_sects = mddev->chunk_size >> 9; |