[NET_SCHED]: HFSC: fix thinko in hfsc_adjust_levels()

When deleting the last child the level of a class should drop to zero.

Noticed by Andreas Mueller <[email protected]>

Signed-off-by: Patrick McHardy <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
Patrick McHardy authored and David S. Miller committed 2006-05-11 12:22:03 -07:00
1 parent b0013fd47b
commit 210525d65d
1 file changed
+3 -3
+3 -3
View File
@@ -974,10 +974,10 @@ hfsc_adjust_levels(struct hfsc_class *cl)
do {
level = 0;
list_for_each_entry(p, &cl->children, siblings) {
if (p->level > level)
level = p->level;
if (p->level >= level)
level = p->level + 1;
}
cl->level = level + 1;
cl->level = level;
} while ((cl = cl->cl_parent) != NULL);
}