diff options
Diffstat (limited to 'net/sched/sch_tbf.c')
-rw-r--r-- | net/sched/sch_tbf.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/net/sched/sch_tbf.c b/net/sched/sch_tbf.c index a2f93c09f3cc..e22dfe85e43e 100644 --- a/net/sched/sch_tbf.c +++ b/net/sched/sch_tbf.c | |||
@@ -236,7 +236,6 @@ static int tbf_change(struct Qdisc* sch, struct nlattr *opt) | |||
236 | struct tc_tbf_qopt *qopt; | 236 | struct tc_tbf_qopt *qopt; |
237 | struct qdisc_rate_table *rtab = NULL; | 237 | struct qdisc_rate_table *rtab = NULL; |
238 | struct qdisc_rate_table *ptab = NULL; | 238 | struct qdisc_rate_table *ptab = NULL; |
239 | struct qdisc_rate_table *tmp; | ||
240 | struct Qdisc *child = NULL; | 239 | struct Qdisc *child = NULL; |
241 | int max_size,n; | 240 | int max_size,n; |
242 | 241 | ||
@@ -295,13 +294,9 @@ static int tbf_change(struct Qdisc* sch, struct nlattr *opt) | |||
295 | q->tokens = q->buffer; | 294 | q->tokens = q->buffer; |
296 | q->ptokens = q->mtu; | 295 | q->ptokens = q->mtu; |
297 | 296 | ||
298 | tmp = q->R_tab; | 297 | swap(q->R_tab, rtab); |
299 | q->R_tab = rtab; | 298 | swap(q->P_tab, ptab); |
300 | rtab = tmp; | ||
301 | 299 | ||
302 | tmp = q->P_tab; | ||
303 | q->P_tab = ptab; | ||
304 | ptab = tmp; | ||
305 | sch_tree_unlock(sch); | 300 | sch_tree_unlock(sch); |
306 | err = 0; | 301 | err = 0; |
307 | done: | 302 | done: |