diff options
author | Patrick McHardy <kaber@trash.net> | 2008-11-20 04:11:36 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-11-20 04:11:36 -0800 |
commit | b94c8afcba3ae6584653b98e315446ea83be6ea5 (patch) | |
tree | 377fcfaf74e3aa38243c736a440e45b378355d8e /net/sched/sch_dsmark.c | |
parent | c19d0369d4c791d90fe0b84d6040a897fe25cc14 (diff) | |
download | linux-b94c8afcba3ae6584653b98e315446ea83be6ea5.tar.bz2 |
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_dsmark.c')
-rw-r--r-- | net/sched/sch_dsmark.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/sched/sch_dsmark.c b/net/sched/sch_dsmark.c index 3f9427a4b757..d303daa45d49 100644 --- a/net/sched/sch_dsmark.c +++ b/net/sched/sch_dsmark.c @@ -68,7 +68,8 @@ static int dsmark_graft(struct Qdisc *sch, unsigned long arg, } sch_tree_lock(sch); - *old = xchg(&p->q, new); + *old = p->q; + p->q = new; qdisc_tree_decrease_qlen(*old, (*old)->q.qlen); qdisc_reset(*old); sch_tree_unlock(sch); |