diff options
author | Jamal Hadi Salim <jhs@mojatatu.com> | 2013-12-23 08:02:13 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-01-06 16:46:56 -0500 |
commit | 805c1f4aedaba1bc8d839e7c27b128083dd5c2f0 (patch) | |
tree | b24ee52fc2370d3a32200d87b4f53352c92ee076 /net/sched | |
parent | 63acd6807c50bfb6a526713c640076ae2226c12a (diff) |
net_sched: act: action flushing missaccounting
action flushing missaccounting
Account only for deleted actions
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/act_api.c | 5 |
1 files 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, | |||
126 | for (i = 0; i < (hinfo->hmask + 1); i++) { | 126 | for (i = 0; i < (hinfo->hmask + 1); i++) { |
127 | head = &hinfo->htab[tcf_hash(i, hinfo->hmask)]; | 127 | head = &hinfo->htab[tcf_hash(i, hinfo->hmask)]; |
128 | hlist_for_each_entry_safe(p, n, head, tcfc_head) { | 128 | hlist_for_each_entry_safe(p, n, head, tcfc_head) { |
129 | if (ACT_P_DELETED == tcf_hash_release(p, 0, hinfo)) | 129 | if (ACT_P_DELETED == tcf_hash_release(p, 0, hinfo)) { |
130 | module_put(a->ops->owner); | 130 | module_put(a->ops->owner); |
131 | n_i++; | 131 | n_i++; |
132 | } | ||
132 | } | 133 | } |
133 | } | 134 | } |
134 | if (nla_put_u32(skb, TCA_FCNT, n_i)) | 135 | if (nla_put_u32(skb, TCA_FCNT, n_i)) |