net: sched: change type of reference and bind counters
Change type of action reference counter to refcount_t. Change type of action bind counter to atomic_t. This type is used to allow decrementing bind counter without testing for 0 result. Reviewed-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com> Signed-off-by: Vlad Buslov <vladbu@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
eec94fdb04
commit
036bb44327
@@ -257,8 +257,8 @@ static int tcf_nat_dump(struct sk_buff *skb, struct tc_action *a,
|
||||
|
||||
.index = p->tcf_index,
|
||||
.action = p->tcf_action,
|
||||
.refcnt = p->tcf_refcnt - ref,
|
||||
.bindcnt = p->tcf_bindcnt - bind,
|
||||
.refcnt = refcount_read(&p->tcf_refcnt) - ref,
|
||||
.bindcnt = atomic_read(&p->tcf_bindcnt) - bind,
|
||||
};
|
||||
struct tcf_t t;
|
||||
|
||||
|
Reference in New Issue
Block a user