summaryrefslogtreecommitdiffstats
path: root/block/partition-generic.c
diff options
context:
space:
mode:
authorMike Snitzer <snitzer@redhat.com>2018-12-06 17:41:18 +0100
committerJens Axboe <axboe@kernel.dk>2018-12-10 16:30:37 +0100
commit112f158f66cbe25fd561a5dfe9c3826e06abf757 (patch)
tree192a838ddd4e61581e6be953dc843d84730de6e8 /block/partition-generic.c
parentdm rq: leverage blk_mq_queue_busy() to check for outstanding IO (diff)
downloadlinux-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/partition-generic.c')
-rw-r--r--block/partition-generic.c5
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,