diff options
author | Mike Snitzer <snitzer@redhat.com> | 2018-12-06 11:41:18 -0500 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2018-12-10 10:30:37 -0500 |
commit | 112f158f66cbe25fd561a5dfe9c3826e06abf757 (patch) | |
tree | 192a838ddd4e61581e6be953dc843d84730de6e8 /block/blk-merge.c | |
parent | dbd3bbd291a03f1383de6242e7999e8487cb869b (diff) |
block: stop passing 'cpu' to all percpu stats methods
All of part_stat_* and related methods are used with preempt disabled,
so there is no need to pass cpu around to allow of them. Just call
smp_processor_id() as needed.
Suggested-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-merge.c')
-rw-r--r-- | block/blk-merge.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/block/blk-merge.c b/block/blk-merge.c index 4431da69a5cf..a120d59b9705 100644 --- a/block/blk-merge.c +++ b/block/blk-merge.c | |||
@@ -685,12 +685,11 @@ static void blk_account_io_merge(struct request *req) | |||
685 | { | 685 | { |
686 | if (blk_do_io_stat(req)) { | 686 | if (blk_do_io_stat(req)) { |
687 | struct hd_struct *part; | 687 | struct hd_struct *part; |
688 | int cpu; | ||
689 | 688 | ||
690 | cpu = part_stat_lock(); | 689 | part_stat_lock(); |
691 | part = req->part; | 690 | part = req->part; |
692 | 691 | ||
693 | part_round_stats(req->q, cpu, part); | 692 | part_round_stats(req->q, part); |
694 | part_dec_in_flight(req->q, part, rq_data_dir(req)); | 693 | part_dec_in_flight(req->q, part, rq_data_dir(req)); |
695 | 694 | ||
696 | hd_struct_put(part); | 695 | hd_struct_put(part); |