Skip to content

Commit

Permalink
net_sched: act: action flushing missaccounting
Browse files Browse the repository at this point in the history
action flushing missaccounting
Account only for deleted actions

Signed-off-by: Jamal Hadi Salim <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
jhsmt authored and davem330 committed Jan 6, 2014
1 parent 63acd68 commit 805c1f4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions net/sched/act_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 805c1f4

Please sign in to comment.