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
@@ -208,8 +208,8 @@ static int tcf_skbedit_dump(struct sk_buff *skb, struct tc_action *a,
|
||||
struct tcf_skbedit *d = to_skbedit(a);
|
||||
struct tc_skbedit opt = {
|
||||
.index = d->tcf_index,
|
||||
.refcnt = d->tcf_refcnt - ref,
|
||||
.bindcnt = d->tcf_bindcnt - bind,
|
||||
.refcnt = refcount_read(&d->tcf_refcnt) - ref,
|
||||
.bindcnt = atomic_read(&d->tcf_bindcnt) - bind,
|
||||
.action = d->tcf_action,
|
||||
};
|
||||
struct tcf_t t;
|
||||
|
Reference in New Issue
Block a user