diff options
Diffstat (limited to 'net/sched/cls_api.c')
-rw-r--r-- | net/sched/cls_api.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c index 6786130a4f59..a481bbe118d3 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, | |||
544 | struct tcf_exts *src) | 544 | struct tcf_exts *src) |
545 | { | 545 | { |
546 | #ifdef CONFIG_NET_CLS_ACT | 546 | #ifdef CONFIG_NET_CLS_ACT |
547 | if (!list_empty(&src->actions)) { | 547 | LIST_HEAD(tmp); |
548 | LIST_HEAD(tmp); | 548 | tcf_tree_lock(tp); |
549 | tcf_tree_lock(tp); | 549 | list_splice_init(&dst->actions, &tmp); |
550 | list_splice_init(&dst->actions, &tmp); | 550 | list_splice(&src->actions, &dst->actions); |
551 | list_splice(&src->actions, &dst->actions); | 551 | tcf_tree_unlock(tp); |
552 | tcf_tree_unlock(tp); | 552 | tcf_action_destroy(&tmp, TCA_ACT_UNBIND); |
553 | tcf_action_destroy(&tmp, TCA_ACT_UNBIND); | ||
554 | } | ||
555 | #endif | 553 | #endif |
556 | } | 554 | } |
557 | EXPORT_SYMBOL(tcf_exts_change); | 555 | EXPORT_SYMBOL(tcf_exts_change); |