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:
committed by
David S. Miller
parent
c19d0369d4
commit
b94c8afcba
@@ -1100,7 +1100,9 @@ static int htb_graft(struct Qdisc *sch, unsigned long arg, struct Qdisc *new,
|
||||
== NULL)
|
||||
return -ENOBUFS;
|
||||
sch_tree_lock(sch);
|
||||
if ((*old = xchg(&cl->un.leaf.q, new)) != NULL) {
|
||||
*old = cl->un.leaf.q;
|
||||
cl->un.leaf.q = new;
|
||||
if (*old != NULL) {
|
||||
qdisc_tree_decrease_qlen(*old, (*old)->q.qlen);
|
||||
qdisc_reset(*old);
|
||||
}
|
||||
|
Reference in New Issue
Block a user