From: Thomas Graf Date: Tue, 31 May 2005 22:15:58 +0000 (-0700) Subject: [PKT_SCHED]: Fix dsmark to count ignored indices while walking X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0451eb074eef30240c6c06dacf2911bee26831e1;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [PKT_SCHED]: Fix dsmark to count ignored indices while walking Unused indices which are ignored while walking must still be counted to avoid dumping the same index twice. Signed-off-by: Thomas Graf Signed-off-by: David S. Miller --- diff --git a/net/sched/sch_dsmark.c b/net/sched/sch_dsmark.c index 8a3db9d95bab..acbe9d2b3e15 100644 --- a/net/sched/sch_dsmark.c +++ b/net/sched/sch_dsmark.c @@ -163,14 +163,15 @@ static void dsmark_walk(struct Qdisc *sch,struct qdisc_walker *walker) return; for (i = 0; i < p->indices; i++) { if (p->mask[i] == 0xff && !p->value[i]) - continue; + goto ignore; if (walker->count >= walker->skip) { if (walker->fn(sch, i+1, walker) < 0) { walker->stop = 1; break; } } - walker->count++; +ignore: + walker->count++; } }