summaryrefslogtreecommitdiffstats
path: root/block/blk-merge.c
diff options
context:
space:
mode:
authorMike Snitzer <snitzer@redhat.com>2018-12-06 11:41:18 -0500
committerJens Axboe <axboe@kernel.dk>2018-12-10 08:30:37 -0700
commit112f158f66cbe25fd561a5dfe9c3826e06abf757 (patch)
tree192a838ddd4e61581e6be953dc843d84730de6e8 /block/blk-merge.c
parentdbd3bbd291a03f1383de6242e7999e8487cb869b (diff)
downloadlinux-112f158f66cbe25fd561a5dfe9c3826e06abf757.tar.gz
linux-112f158f66cbe25fd561a5dfe9c3826e06abf757.tar.bz2
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.c5
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);