summaryrefslogtreecommitdiffstats
path: root/net/sched/sch_drr.c
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2008-11-20 13:11:36 +0100
committerDavid S. Miller <davem@davemloft.net>2008-11-20 13:11:36 +0100
commitb94c8afcba3ae6584653b98e315446ea83be6ea5 (patch)
tree377fcfaf74e3aa38243c736a440e45b378355d8e /net/sched/sch_drr.c
parentisdn: isdn_net.c annotate struct ip_ports and trivial sparse fixes (diff)
downloadlinux-b94c8afcba3ae6584653b98e315446ea83be6ea5.tar.xz
linux-b94c8afcba3ae6584653b98e315446ea83be6ea5.zip
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_drr.c')
-rw-r--r--net/sched/sch_drr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/sched/sch_drr.c b/net/sched/sch_drr.c
index e71a5de23e23..8d523d9b636c 100644
--- a/net/sched/sch_drr.c
+++ b/net/sched/sch_drr.c
@@ -208,7 +208,8 @@ static int drr_graft_class(struct Qdisc *sch, unsigned long arg,
sch_tree_lock(sch);
drr_purge_queue(cl);
- *old = xchg(&cl->qdisc, new);
+ *old = cl->qdisc;
+ cl->qdisc = new;
sch_tree_unlock(sch);
return 0;
}