From 805c1f4aedaba1bc8d839e7c27b128083dd5c2f0 Mon Sep 17 00:00:00 2001 From: Jamal Hadi Salim Date: Mon, 23 Dec 2013 08:02:13 -0500 Subject: [PATCH] net_sched: act: action flushing missaccounting action flushing missaccounting Account only for deleted actions Signed-off-by: Jamal Hadi Salim Signed-off-by: David S. Miller --- net/sched/act_api.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/net/sched/act_api.c b/net/sched/act_api.c index 2b69e537baa9..f63e1467cd3a 100644 --- a/net/sched/act_api.c +++ b/net/sched/act_api.c @@ -126,9 +126,10 @@ static int tcf_del_walker(struct sk_buff *skb, struct tc_action *a, for (i = 0; i < (hinfo->hmask + 1); i++) { head = &hinfo->htab[tcf_hash(i, hinfo->hmask)]; hlist_for_each_entry_safe(p, n, head, tcfc_head) { - if (ACT_P_DELETED == tcf_hash_release(p, 0, hinfo)) + if (ACT_P_DELETED == tcf_hash_release(p, 0, hinfo)) { module_put(a->ops->owner); - n_i++; + n_i++; + } } } if (nla_put_u32(skb, TCA_FCNT, n_i))