diff options
Diffstat (limited to 'block/blk-merge.c')
-rw-r--r-- | block/blk-merge.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/block/blk-merge.c b/block/blk-merge.c index eb2a3ca58303..d926a24bf1fd 100644 --- a/block/blk-merge.c +++ b/block/blk-merge.c | |||
@@ -388,18 +388,19 @@ static int attempt_merge(struct request_queue *q, struct request *req, | |||
388 | 388 | ||
389 | if (req->rq_disk) { | 389 | if (req->rq_disk) { |
390 | struct hd_struct *part; | 390 | struct hd_struct *part; |
391 | int cpu; | ||
391 | 392 | ||
392 | rcu_read_lock(); | 393 | cpu = disk_stat_lock(); |
393 | |||
394 | part = disk_map_sector_rcu(req->rq_disk, req->sector); | 394 | part = disk_map_sector_rcu(req->rq_disk, req->sector); |
395 | disk_round_stats(req->rq_disk); | 395 | |
396 | disk_round_stats(cpu, req->rq_disk); | ||
396 | req->rq_disk->in_flight--; | 397 | req->rq_disk->in_flight--; |
397 | if (part) { | 398 | if (part) { |
398 | part_round_stats(part); | 399 | part_round_stats(cpu, part); |
399 | part->in_flight--; | 400 | part->in_flight--; |
400 | } | 401 | } |
401 | 402 | ||
402 | rcu_read_unlock(); | 403 | disk_stat_unlock(); |
403 | } | 404 | } |
404 | 405 | ||
405 | req->ioprio = ioprio_best(req->ioprio, next->ioprio); | 406 | req->ioprio = ioprio_best(req->ioprio, next->ioprio); |