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_tbf.c
diff --git
a/net/sched/sch_tbf.c
b/net/sched/sch_tbf.c
index
d9a5d29
..
cb9711e
100644
(file)
--- a/
net/sched/sch_tbf.c
+++ b/
net/sched/sch_tbf.c
@@
-12,6
+12,7
@@
*
*/
*
*/
+#include <linux/config.h>
#include <linux/module.h>
#include <asm/uaccess.h>
#include <asm/system.h>
#include <linux/module.h>
#include <asm/uaccess.h>
#include <asm/system.h>
@@
-176,9
+177,9
@@
static int tbf_requeue(struct sk_buff *skb, struct Qdisc* sch)
static unsigned int tbf_drop(struct Qdisc* sch)
{
struct tbf_sched_data *q = qdisc_priv(sch);
static unsigned int tbf_drop(struct Qdisc* sch)
{
struct tbf_sched_data *q = qdisc_priv(sch);
- unsigned int len
= 0
;
+ unsigned int len;
- if (
q->qdisc->ops->drop &&
(len = q->qdisc->ops->drop(q->qdisc)) != 0) {
+ if ((len = q->qdisc->ops->drop(q->qdisc)) != 0) {
sch->q.qlen--;
sch->qstats.drops++;
}
sch->q.qlen--;
sch->qstats.drops++;
}
@@
-340,14
+341,13
@@
static int tbf_change(struct Qdisc* sch, struct rtattr *opt)
if (max_size < 0)
goto done;
if (max_size < 0)
goto done;
- if (q
opt->limit > 0
) {
+ if (q
->qdisc == &noop_qdisc
) {
if ((child = tbf_create_dflt_qdisc(sch->dev, qopt->limit)) == NULL)
goto done;
}
sch_tree_lock(sch);
if ((child = tbf_create_dflt_qdisc(sch->dev, qopt->limit)) == NULL)
goto done;
}
sch_tree_lock(sch);
- if (child)
- qdisc_destroy(xchg(&q->qdisc, child));
+ if (child) q->qdisc = child;
q->limit = qopt->limit;
q->mtu = qopt->mtu;
q->max_size = max_size;
q->limit = qopt->limit;
q->mtu = qopt->mtu;
q->max_size = max_size;