diff options
Diffstat (limited to 'net/sched/sch_htb.c')
-rw-r--r-- | net/sched/sch_htb.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c index 4be8d04b262d..01b519d6c52d 100644 --- a/net/sched/sch_htb.c +++ b/net/sched/sch_htb.c | |||
@@ -1121,8 +1121,7 @@ static int htb_graft(struct Qdisc *sch, unsigned long arg, struct Qdisc *new, | |||
1121 | if (cl->level) | 1121 | if (cl->level) |
1122 | return -EINVAL; | 1122 | return -EINVAL; |
1123 | if (new == NULL && | 1123 | if (new == NULL && |
1124 | (new = qdisc_create_dflt(qdisc_dev(sch), sch->dev_queue, | 1124 | (new = qdisc_create_dflt(sch->dev_queue, &pfifo_qdisc_ops, |
1125 | &pfifo_qdisc_ops, | ||
1126 | cl->common.classid)) == NULL) | 1125 | cl->common.classid)) == NULL) |
1127 | return -ENOBUFS; | 1126 | return -ENOBUFS; |
1128 | 1127 | ||
@@ -1247,8 +1246,7 @@ static int htb_delete(struct Qdisc *sch, unsigned long arg) | |||
1247 | return -EBUSY; | 1246 | return -EBUSY; |
1248 | 1247 | ||
1249 | if (!cl->level && htb_parent_last_child(cl)) { | 1248 | if (!cl->level && htb_parent_last_child(cl)) { |
1250 | new_q = qdisc_create_dflt(qdisc_dev(sch), sch->dev_queue, | 1249 | new_q = qdisc_create_dflt(sch->dev_queue, &pfifo_qdisc_ops, |
1251 | &pfifo_qdisc_ops, | ||
1252 | cl->parent->common.classid); | 1250 | cl->parent->common.classid); |
1253 | last_child = 1; | 1251 | last_child = 1; |
1254 | } | 1252 | } |
@@ -1302,14 +1300,14 @@ static int htb_change_class(struct Qdisc *sch, u32 classid, | |||
1302 | struct htb_class *cl = (struct htb_class *)*arg, *parent; | 1300 | struct htb_class *cl = (struct htb_class *)*arg, *parent; |
1303 | struct nlattr *opt = tca[TCA_OPTIONS]; | 1301 | struct nlattr *opt = tca[TCA_OPTIONS]; |
1304 | struct qdisc_rate_table *rtab = NULL, *ctab = NULL; | 1302 | struct qdisc_rate_table *rtab = NULL, *ctab = NULL; |
1305 | struct nlattr *tb[TCA_HTB_RTAB + 1]; | 1303 | struct nlattr *tb[__TCA_HTB_MAX]; |
1306 | struct tc_htb_opt *hopt; | 1304 | struct tc_htb_opt *hopt; |
1307 | 1305 | ||
1308 | /* extract all subattrs from opt attr */ | 1306 | /* extract all subattrs from opt attr */ |
1309 | if (!opt) | 1307 | if (!opt) |
1310 | goto failure; | 1308 | goto failure; |
1311 | 1309 | ||
1312 | err = nla_parse_nested(tb, TCA_HTB_RTAB, opt, htb_policy); | 1310 | err = nla_parse_nested(tb, TCA_HTB_MAX, opt, htb_policy); |
1313 | if (err < 0) | 1311 | if (err < 0) |
1314 | goto failure; | 1312 | goto failure; |
1315 | 1313 | ||
@@ -1377,7 +1375,7 @@ static int htb_change_class(struct Qdisc *sch, u32 classid, | |||
1377 | /* create leaf qdisc early because it uses kmalloc(GFP_KERNEL) | 1375 | /* create leaf qdisc early because it uses kmalloc(GFP_KERNEL) |
1378 | so that can't be used inside of sch_tree_lock | 1376 | so that can't be used inside of sch_tree_lock |
1379 | -- thanks to Karlis Peisenieks */ | 1377 | -- thanks to Karlis Peisenieks */ |
1380 | new_q = qdisc_create_dflt(qdisc_dev(sch), sch->dev_queue, | 1378 | new_q = qdisc_create_dflt(sch->dev_queue, |
1381 | &pfifo_qdisc_ops, classid); | 1379 | &pfifo_qdisc_ops, classid); |
1382 | sch_tree_lock(sch); | 1380 | sch_tree_lock(sch); |
1383 | if (parent && !parent->level) { | 1381 | if (parent && !parent->level) { |