diff options
author | Mikulas Patocka <mpatocka@redhat.com> | 2018-12-06 11:41:21 -0500 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2018-12-10 10:30:38 -0500 |
commit | e016b78201a2d9ff40f3f0da072292689af24c7f (patch) | |
tree | c81a404bcfe431857279e2f18c4a20e38191609c /block/partition-generic.c | |
parent | 1226b8dd0e91331cfab500f305b2c264445a0392 (diff) |
block: return just one value from part_in_flight
The previous patches deleted all the code that needed the second value
returned from part_in_flight - now the kernel only uses the first value.
Consequently, part_in_flight (and blk_mq_in_flight) may be changed so that
it only returns one value.
This patch just refactors the code, there's no functional change.
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
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 | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/block/partition-generic.c b/block/partition-generic.c index 42d6138ac876..8e596a8dff32 100644 --- a/block/partition-generic.c +++ b/block/partition-generic.c | |||
@@ -120,9 +120,9 @@ ssize_t part_stat_show(struct device *dev, | |||
120 | { | 120 | { |
121 | struct hd_struct *p = dev_to_part(dev); | 121 | struct hd_struct *p = dev_to_part(dev); |
122 | struct request_queue *q = part_to_disk(p)->queue; | 122 | struct request_queue *q = part_to_disk(p)->queue; |
123 | unsigned int inflight[2]; | 123 | unsigned int inflight; |
124 | 124 | ||
125 | part_in_flight(q, p, inflight); | 125 | inflight = part_in_flight(q, p); |
126 | return sprintf(buf, | 126 | return sprintf(buf, |
127 | "%8lu %8lu %8llu %8u " | 127 | "%8lu %8lu %8llu %8u " |
128 | "%8lu %8lu %8llu %8u " | 128 | "%8lu %8lu %8llu %8u " |
@@ -137,7 +137,7 @@ ssize_t part_stat_show(struct device *dev, | |||
137 | part_stat_read(p, merges[STAT_WRITE]), | 137 | part_stat_read(p, merges[STAT_WRITE]), |
138 | (unsigned long long)part_stat_read(p, sectors[STAT_WRITE]), | 138 | (unsigned long long)part_stat_read(p, sectors[STAT_WRITE]), |
139 | (unsigned int)part_stat_read_msecs(p, STAT_WRITE), | 139 | (unsigned int)part_stat_read_msecs(p, STAT_WRITE), |
140 | inflight[0], | 140 | inflight, |
141 | jiffies_to_msecs(part_stat_read(p, io_ticks)), | 141 | jiffies_to_msecs(part_stat_read(p, io_ticks)), |
142 | jiffies_to_msecs(part_stat_read(p, time_in_queue)), | 142 | jiffies_to_msecs(part_stat_read(p, time_in_queue)), |
143 | part_stat_read(p, ios[STAT_DISCARD]), | 143 | part_stat_read(p, ios[STAT_DISCARD]), |