]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - net/sched/sch_atm.c
pkt_sched: remove unnecessary xchg() in packet schedulers
[net-next-2.6.git] / net / sched / sch_atm.c
index ca90f6e59aeec81c85aef0ae8f121a7efbdadf79..2a8b83af7c47a4bbee4471cc62894d46ca1d233a 100644 (file)
@@ -102,7 +102,8 @@ static int atm_tc_graft(struct Qdisc *sch, unsigned long arg,
                return -EINVAL;
        if (!new)
                new = &noop_qdisc;
-       *old = xchg(&flow->q, new);
+       *old = flow->q;
+       flow->q = new;
        if (*old)
                qdisc_reset(*old);
        return 0;