aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/sch_cbq.c
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2008-11-20 07:11:36 -0500
committerDavid S. Miller <davem@davemloft.net>2008-11-20 07:11:36 -0500
commitb94c8afcba3ae6584653b98e315446ea83be6ea5 (patch)
tree377fcfaf74e3aa38243c736a440e45b378355d8e /net/sched/sch_cbq.c
parentc19d0369d4c791d90fe0b84d6040a897fe25cc14 (diff)
pkt_sched: remove unnecessary xchg() in packet schedulers
The use of xchg() hasn't been necessary since 2.2.something when proper locking was added to packet schedulers. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/sch_cbq.c')
-rw-r--r--net/sched/sch_cbq.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/net/sched/sch_cbq.c b/net/sched/sch_cbq.c
index a99e37e9e6f1..3a9569a3396c 100644
--- a/net/sched/sch_cbq.c
+++ b/net/sched/sch_cbq.c
@@ -1635,7 +1635,8 @@ static int cbq_graft(struct Qdisc *sch, unsigned long arg, struct Qdisc *new,
1635#endif 1635#endif
1636 } 1636 }
1637 sch_tree_lock(sch); 1637 sch_tree_lock(sch);
1638 *old = xchg(&cl->q, new); 1638 *old = cl->q;
1639 cl->q = new;
1639 qdisc_tree_decrease_qlen(*old, (*old)->q.qlen); 1640 qdisc_tree_decrease_qlen(*old, (*old)->q.qlen);
1640 qdisc_reset(*old); 1641 qdisc_reset(*old);
1641 sch_tree_unlock(sch); 1642 sch_tree_unlock(sch);
@@ -1776,8 +1777,8 @@ cbq_change_class(struct Qdisc *sch, u32 classid, u32 parentid, struct nlattr **t
1776 cbq_deactivate_class(cl); 1777 cbq_deactivate_class(cl);
1777 1778
1778 if (rtab) { 1779 if (rtab) {
1779 rtab = xchg(&cl->R_tab, rtab); 1780 qdisc_put_rtab(cl->R_tab);
1780 qdisc_put_rtab(rtab); 1781 cl->R_tab = rtab;
1781 } 1782 }
1782 1783
1783 if (tb[TCA_CBQ_LSSOPT]) 1784 if (tb[TCA_CBQ_LSSOPT])