|
@@ -145,13 +145,15 @@ ssize_t part_stat_show(struct device *dev,
|
|
|
jiffies_to_msecs(part_stat_read(p, time_in_queue)));
|
|
|
}
|
|
|
|
|
|
-ssize_t part_inflight_show(struct device *dev,
|
|
|
- struct device_attribute *attr, char *buf)
|
|
|
+ssize_t part_inflight_show(struct device *dev, struct device_attribute *attr,
|
|
|
+ char *buf)
|
|
|
{
|
|
|
struct hd_struct *p = dev_to_part(dev);
|
|
|
+ struct request_queue *q = part_to_disk(p)->queue;
|
|
|
+ unsigned int inflight[2];
|
|
|
|
|
|
- return sprintf(buf, "%8u %8u\n", atomic_read(&p->in_flight[0]),
|
|
|
- atomic_read(&p->in_flight[1]));
|
|
|
+ part_in_flight_rw(q, p, inflight);
|
|
|
+ return sprintf(buf, "%8u %8u\n", inflight[0], inflight[1]);
|
|
|
}
|
|
|
|
|
|
#ifdef CONFIG_FAIL_MAKE_REQUEST
|