Merge branch 'for-3.18/core' of git://git.kernel.dk/linux-block
[firefly-linux-kernel-4.4.55.git] / net / sched / sch_mq.c
index a8b2864a696be934114a3b23ccf75e0cb8c4d1d6..f3cbaecd283af4ce5a78ad90d135d008d2b542d7 100644 (file)
@@ -112,7 +112,6 @@ static int mq_dump(struct Qdisc *sch, struct sk_buff *skb)
                sch->q.qlen             += qdisc->q.qlen;
                sch->bstats.bytes       += qdisc->bstats.bytes;
                sch->bstats.packets     += qdisc->bstats.packets;
-               sch->qstats.qlen        += qdisc->qstats.qlen;
                sch->qstats.backlog     += qdisc->qstats.backlog;
                sch->qstats.drops       += qdisc->qstats.drops;
                sch->qstats.requeues    += qdisc->qstats.requeues;
@@ -200,9 +199,8 @@ static int mq_dump_class_stats(struct Qdisc *sch, unsigned long cl,
        struct netdev_queue *dev_queue = mq_queue_get(sch, cl);
 
        sch = dev_queue->qdisc_sleeping;
-       sch->qstats.qlen = sch->q.qlen;
-       if (gnet_stats_copy_basic(d, &sch->bstats) < 0 ||
-           gnet_stats_copy_queue(d, &sch->qstats) < 0)
+       if (gnet_stats_copy_basic(d, NULL, &sch->bstats) < 0 ||
+           gnet_stats_copy_queue(d, NULL, &sch->qstats, sch->q.qlen) < 0)
                return -1;
        return 0;
 }