aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/sch_netem.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_netem.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_netem.c')
-rw-r--r--net/sched/sch_netem.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/net/sched/sch_netem.c b/net/sched/sch_netem.c
index 3cbc3ff7b5bc..f840d6b27c65 100644
--- a/net/sched/sch_netem.c
+++ b/net/sched/sch_netem.c
@@ -331,10 +331,9 @@ static int get_dist_table(struct Qdisc *sch, const struct nlattr *attr)
331 root_lock = qdisc_root_sleeping_lock(sch); 331 root_lock = qdisc_root_sleeping_lock(sch);
332 332
333 spin_lock_bh(root_lock); 333 spin_lock_bh(root_lock);
334 d = xchg(&q->delay_dist, d); 334 kfree(q->delay_dist);
335 q->delay_dist = d;
335 spin_unlock_bh(root_lock); 336 spin_unlock_bh(root_lock);
336
337 kfree(d);
338 return 0; 337 return 0;
339} 338}
340 339