diff options
author | Patrick McHardy <kaber@trash.net> | 2008-11-19 08:03:09 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-11-20 04:14:28 -0800 |
commit | 47a1a1d4be2910b13a8e90f75c17e253c39531ff (patch) | |
tree | c900f283bd96f0b26236152ada24f9a113f65e2b /net/sched/cls_api.c | |
parent | b94c8afcba3ae6584653b98e315446ea83be6ea5 (diff) |
pkt_sched: remove unnecessary xchg() in packet classifiers
The use of xchg() hasn't been necessary since 2.2.something when proper
locking was added to packet schedulers. In the case of classifiers they
mostly weren't even necessary before that since they're mainly used
to assign a NULL pointer to the filter root in the ->destroy path;
the root is destroyed immediately after that.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/cls_api.c')
-rw-r--r-- | net/sched/cls_api.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c index 16e7ac9774e..173fcc4b050 100644 --- a/net/sched/cls_api.c +++ b/net/sched/cls_api.c @@ -531,7 +531,8 @@ void tcf_exts_change(struct tcf_proto *tp, struct tcf_exts *dst, if (src->action) { struct tc_action *act; tcf_tree_lock(tp); - act = xchg(&dst->action, src->action); + act = dst->action; + dst->action = src->action; tcf_tree_unlock(tp); if (act) tcf_action_destroy(act, TCA_ACT_UNBIND); |