git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git]
/
net
/
sched
/
sch_hfsc.c
diff --git
a/net/sched/sch_hfsc.c
b/net/sched/sch_hfsc.c
index
6a6735a
..
91132f6
100644
(file)
--- a/
net/sched/sch_hfsc.c
+++ b/
net/sched/sch_hfsc.c
@@
-50,6
+50,7
@@
*/
#include <linux/kernel.h>
*/
#include <linux/kernel.h>
+#include <linux/config.h>
#include <linux/module.h>
#include <linux/types.h>
#include <linux/errno.h>
#include <linux/module.h>
#include <linux/types.h>
#include <linux/errno.h>
@@
-973,10
+974,10
@@
hfsc_adjust_levels(struct hfsc_class *cl)
do {
level = 0;
list_for_each_entry(p, &cl->children, siblings) {
do {
level = 0;
list_for_each_entry(p, &cl->children, siblings) {
- if (p->level >
=
level)
- level = p->level
+ 1
;
+ if (p->level > level)
+ level = p->level;
}
}
- cl->level = level;
+ cl->level = level
+ 1
;
} while ((cl = cl->cl_parent) != NULL);
}
} while ((cl = cl->cl_parent) != NULL);
}
@@
-1123,9
+1124,10
@@
hfsc_change_class(struct Qdisc *sch, u32 classid, u32 parentid,
if (rsc == NULL && fsc == NULL)
return -EINVAL;
if (rsc == NULL && fsc == NULL)
return -EINVAL;
- cl = k
z
alloc(sizeof(struct hfsc_class), GFP_KERNEL);
+ cl = k
m
alloc(sizeof(struct hfsc_class), GFP_KERNEL);
if (cl == NULL)
return -ENOBUFS;
if (cl == NULL)
return -ENOBUFS;
+ memset(cl, 0, sizeof(struct hfsc_class));
if (rsc != NULL)
hfsc_change_rsc(cl, rsc, 0);
if (rsc != NULL)
hfsc_change_rsc(cl, rsc, 0);