mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-23 23:21:46 +00:00
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>
This commit is contained in:
parent
b94c8afcba
commit
47a1a1d4be
7 changed files with 12 additions and 18 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue