diff options
author | Mike Snitzer <snitzer@redhat.com> | 2018-12-06 17:41:18 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2018-12-10 16:30:37 +0100 |
commit | 112f158f66cbe25fd561a5dfe9c3826e06abf757 (patch) | |
tree | 192a838ddd4e61581e6be953dc843d84730de6e8 /block/blk-merge.c | |
parent | dm rq: leverage blk_mq_queue_busy() to check for outstanding IO (diff) | |
download | linux-112f158f66cbe25fd561a5dfe9c3826e06abf757.tar.xz linux-112f158f66cbe25fd561a5dfe9c3826e06abf757.zip |
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) { if (blk_do_io_stat(req)) { struct hd_struct *part; - int cpu; - cpu = part_stat_lock(); + part_stat_lock(); part = req->part; - part_round_stats(req->q, cpu, part); + part_round_stats(req->q, part); part_dec_in_flight(req->q, part, rq_data_dir(req)); hd_struct_put(part); |