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
@@ -331,10 +331,9 @@ static int get_dist_table(struct Qdisc *sch, const struct nlattr *attr)
|
||||
root_lock = qdisc_root_sleeping_lock(sch);
|
||||
|
||||
spin_lock_bh(root_lock);
|
||||
d = xchg(&q->delay_dist, d);
|
||||
kfree(q->delay_dist);
|
||||
q->delay_dist = d;
|
||||
spin_unlock_bh(root_lock);
|
||||
|
||||
kfree(d);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user