summaryrefslogtreecommitdiffstats
path: root/net/sched
diff options
context:
space:
mode:
authorCong Wang <cwang@twopensource.com>2014-04-25 13:55:30 -0700
committerDavid S. Miller <davem@davemloft.net>2014-04-27 23:42:39 -0400
commita49eb42a341f1df8fa0f9dc4449f9dd4a3234a2f (patch)
treed57c9fb4e9e09ca9560321ac69a057dd1f455fce /net/sched
parent2f7ef2f8790f5bf53db4fc6b2310943139285827 (diff)
downloadop-kernel-dev-a49eb42a341f1df8fa0f9dc4449f9dd4a3234a2f.zip
op-kernel-dev-a49eb42a341f1df8fa0f9dc4449f9dd4a3234a2f.tar.gz
sched, act: allow to clear all actions as well
When we change the list of action on a given filter, currently we don't change it to empty. This is a bug, we should allow to change to whatever users given. Cc: Jamal Hadi Salim <jhs@mojatatu.com> Cc: David S. Miller <davem@davemloft.net> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: Cong Wang <cwang@twopensource.com> Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched')
-rw-r--r--net/sched/cls_api.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c
index 6786130..a481bbe 100644
--- a/net/sched/cls_api.c
+++ b/net/sched/cls_api.c
@@ -544,14 +544,12 @@ void tcf_exts_change(struct tcf_proto *tp, struct tcf_exts *dst,
struct tcf_exts *src)
{
#ifdef CONFIG_NET_CLS_ACT
- if (!list_empty(&src->actions)) {
- LIST_HEAD(tmp);
- tcf_tree_lock(tp);
- list_splice_init(&dst->actions, &tmp);
- list_splice(&src->actions, &dst->actions);
- tcf_tree_unlock(tp);
- tcf_action_destroy(&tmp, TCA_ACT_UNBIND);
- }
+ LIST_HEAD(tmp);
+ tcf_tree_lock(tp);
+ list_splice_init(&dst->actions, &tmp);
+ list_splice(&src->actions, &dst->actions);
+ tcf_tree_unlock(tp);
+ tcf_action_destroy(&tmp, TCA_ACT_UNBIND);
#endif
}
EXPORT_SYMBOL(tcf_exts_change);
OpenPOWER on IntegriCloud