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>
This commit is contained in:
Patrick McHardy
2008-11-20 04:11:36 -08:00
committed by David S. Miller
parent c19d0369d4
commit b94c8afcba
11 changed files with 52 additions and 31 deletions

View File

@@ -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;
}