Message ID | bbf02e9095a5e8d5d71c7001881aa6d5c765bda2.1506021255.git.shli@fb.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On 09/21/2017 01:17 PM, Shaohua Li wrote: > part_stat_show takes a part device not a disk, so we should use > part_to_disk. Oops, thanks Shaohua! Applied.
diff --git a/block/partition-generic.c b/block/partition-generic.c index 86e8fe1..88c555d 100644 --- a/block/partition-generic.c +++ b/block/partition-generic.c @@ -112,7 +112,7 @@ ssize_t part_stat_show(struct device *dev, struct device_attribute *attr, char *buf) { struct hd_struct *p = dev_to_part(dev); - struct request_queue *q = dev_to_disk(dev)->queue; + struct request_queue *q = part_to_disk(p)->queue; unsigned int inflight[2]; int cpu;
part_stat_show takes a part device not a disk, so we should use part_to_disk. Fix: d62e26b3ffd2(block: pass in queue to inflight accounting) Cc: Bart Van Assche <bart.vanassche@wdc.com> Cc: Omar Sandoval <osandov@fb.com> Signed-off-by: Shaohua Li <shli@fb.com> --- block/partition-generic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)