aboutsummaryrefslogtreecommitdiff
path: root/block/genhd.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2018-06-27 14:34:10 +0100
committerMark Brown <broonie@kernel.org>2018-06-27 14:34:10 +0100
commiteed41b9f413f40183095d27ffc94fb942fe18bb6 (patch)
tree0a28112db2410e9ae7586343895079d470121599 /block/genhd.c
parent698f8bc0bacea1351db9de6f247e6922fb4d7f80 (diff)
parent1ce34dea91ae86bb18f493f72292df1bf6f66df7 (diff)
Merge branch 'linux-linaro-lsk-v4.14' into linux-linaro-lsk-v4.14-rtlsk-v4.14-18.06-rt
Diffstat (limited to 'block/genhd.c')
-rw-r--r--block/genhd.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/block/genhd.c b/block/genhd.c
index dd305c65ffb0..449ef56bba70 100644
--- a/block/genhd.c
+++ b/block/genhd.c
@@ -82,6 +82,18 @@ void part_in_flight(struct request_queue *q, struct hd_struct *part,
}
}
+void part_in_flight_rw(struct request_queue *q, struct hd_struct *part,
+ unsigned int inflight[2])
+{
+ if (q->mq_ops) {
+ blk_mq_in_flight_rw(q, part, inflight);
+ return;
+ }
+
+ inflight[0] = atomic_read(&part->in_flight[0]);
+ inflight[1] = atomic_read(&part->in_flight[1]);
+}
+
struct hd_struct *__disk_get_part(struct gendisk *disk, int partno)
{
struct disk_part_tbl *ptbl = rcu_dereference(disk->part_tbl);