aboutsummaryrefslogtreecommitdiffstats
path: root/block/blk-merge.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/blk-merge.c')
-rw-r--r--block/blk-merge.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/block/blk-merge.c b/block/blk-merge.c
index d926a24bf1fd..c77196d55899 100644
--- a/block/blk-merge.c
+++ b/block/blk-merge.c
@@ -390,17 +390,13 @@ static int attempt_merge(struct request_queue *q, struct request *req,
390 struct hd_struct *part; 390 struct hd_struct *part;
391 int cpu; 391 int cpu;
392 392
393 cpu = disk_stat_lock(); 393 cpu = part_stat_lock();
394 part = disk_map_sector_rcu(req->rq_disk, req->sector); 394 part = disk_map_sector_rcu(req->rq_disk, req->sector);
395 395
396 disk_round_stats(cpu, req->rq_disk); 396 part_round_stats(cpu, part);
397 req->rq_disk->in_flight--; 397 part_dec_in_flight(part);
398 if (part) {
399 part_round_stats(cpu, part);
400 part->in_flight--;
401 }
402 398
403 disk_stat_unlock(); 399 part_stat_unlock();
404 } 400 }
405 401
406 req->ioprio = ioprio_best(req->ioprio, next->ioprio); 402 req->ioprio = ioprio_best(req->ioprio, next->ioprio);