diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2014-03-31 12:17:33 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2014-03-31 12:17:33 -0400 |
commit | ade63aada79c61bcd5f51cbd310f237399892268 (patch) | |
tree | 4f8605528bfd9b6261679883974b9ac4870223dd /net/sched/sch_tbf.c | |
parent | 9a1724c7506bfa7d3d9dcab13f83e9e6446929f9 (diff) | |
parent | c14af233fbe279d0e561ecf84f1208b1bae087ef (diff) |
Merge branch '3.14-fixes' into mips-for-linux-next
Diffstat (limited to 'net/sched/sch_tbf.c')
-rw-r--r-- | net/sched/sch_tbf.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/net/sched/sch_tbf.c b/net/sched/sch_tbf.c index 1cb413fead89..4f505a006896 100644 --- a/net/sched/sch_tbf.c +++ b/net/sched/sch_tbf.c | |||
@@ -334,18 +334,6 @@ static int tbf_change(struct Qdisc *sch, struct nlattr *opt) | |||
334 | qdisc_put_rtab(qdisc_get_rtab(&qopt->peakrate, | 334 | qdisc_put_rtab(qdisc_get_rtab(&qopt->peakrate, |
335 | tb[TCA_TBF_PTAB])); | 335 | tb[TCA_TBF_PTAB])); |
336 | 336 | ||
337 | if (q->qdisc != &noop_qdisc) { | ||
338 | err = fifo_set_limit(q->qdisc, qopt->limit); | ||
339 | if (err) | ||
340 | goto done; | ||
341 | } else if (qopt->limit > 0) { | ||
342 | child = fifo_create_dflt(sch, &bfifo_qdisc_ops, qopt->limit); | ||
343 | if (IS_ERR(child)) { | ||
344 | err = PTR_ERR(child); | ||
345 | goto done; | ||
346 | } | ||
347 | } | ||
348 | |||
349 | buffer = min_t(u64, PSCHED_TICKS2NS(qopt->buffer), ~0U); | 337 | buffer = min_t(u64, PSCHED_TICKS2NS(qopt->buffer), ~0U); |
350 | mtu = min_t(u64, PSCHED_TICKS2NS(qopt->mtu), ~0U); | 338 | mtu = min_t(u64, PSCHED_TICKS2NS(qopt->mtu), ~0U); |
351 | 339 | ||
@@ -390,6 +378,18 @@ static int tbf_change(struct Qdisc *sch, struct nlattr *opt) | |||
390 | goto done; | 378 | goto done; |
391 | } | 379 | } |
392 | 380 | ||
381 | if (q->qdisc != &noop_qdisc) { | ||
382 | err = fifo_set_limit(q->qdisc, qopt->limit); | ||
383 | if (err) | ||
384 | goto done; | ||
385 | } else if (qopt->limit > 0) { | ||
386 | child = fifo_create_dflt(sch, &bfifo_qdisc_ops, qopt->limit); | ||
387 | if (IS_ERR(child)) { | ||
388 | err = PTR_ERR(child); | ||
389 | goto done; | ||
390 | } | ||
391 | } | ||
392 | |||
393 | sch_tree_lock(sch); | 393 | sch_tree_lock(sch); |
394 | if (child) { | 394 | if (child) { |
395 | qdisc_tree_decrease_qlen(q->qdisc, q->qdisc->q.qlen); | 395 | qdisc_tree_decrease_qlen(q->qdisc, q->qdisc->q.qlen); |