]> git.ipfire.org Git - people/arne_f/kernel.git/blobdiff - block/genhd.c
USB: serial: option: support dynamic Quectel USB compositions
[people/arne_f/kernel.git] / block / genhd.c
index dd305c65ffb05d5016f1c602e65849a2fbf8e418..449ef56bba708920973ef62e20464e8c00a880e5 100644 (file)
@@ -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);