diff options
author | Mike Snitzer <snitzer@redhat.com> | 2018-12-06 11:41:18 -0500 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2018-12-10 08:30:37 -0700 |
commit | 112f158f66cbe25fd561a5dfe9c3826e06abf757 (patch) | |
tree | 192a838ddd4e61581e6be953dc843d84730de6e8 /block/partition-generic.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/partition-generic.c')
-rw-r--r-- | block/partition-generic.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/block/partition-generic.c b/block/partition-generic.c index 5f8db5c5140f..7e663cfb1487 100644 --- a/block/partition-generic.c +++ b/block/partition-generic.c @@ -121,10 +121,9 @@ ssize_t part_stat_show(struct device *dev, struct hd_struct *p = dev_to_part(dev); struct request_queue *q = part_to_disk(p)->queue; unsigned int inflight[2]; - int cpu; - cpu = part_stat_lock(); - part_round_stats(q, cpu, p); + part_stat_lock(); + part_round_stats(q, p); part_stat_unlock(); part_in_flight(q, p, inflight); return sprintf(buf, |