|
@@ -839,7 +839,7 @@ static int qdisc_graft(struct net_device *dev, struct Qdisc *parent,
|
|
|
|
|
|
old = dev_graft_qdisc(dev_queue, new);
|
|
old = dev_graft_qdisc(dev_queue, new);
|
|
if (new && i > 0)
|
|
if (new && i > 0)
|
|
- atomic_inc(&new->refcnt);
|
|
|
|
|
|
+ refcount_inc(&new->refcnt);
|
|
|
|
|
|
if (!ingress)
|
|
if (!ingress)
|
|
qdisc_destroy(old);
|
|
qdisc_destroy(old);
|
|
@@ -850,7 +850,7 @@ skip:
|
|
notify_and_destroy(net, skb, n, classid,
|
|
notify_and_destroy(net, skb, n, classid,
|
|
dev->qdisc, new);
|
|
dev->qdisc, new);
|
|
if (new && !new->ops->attach)
|
|
if (new && !new->ops->attach)
|
|
- atomic_inc(&new->refcnt);
|
|
|
|
|
|
+ refcount_inc(&new->refcnt);
|
|
dev->qdisc = new ? : &noop_qdisc;
|
|
dev->qdisc = new ? : &noop_qdisc;
|
|
|
|
|
|
if (new && new->ops->attach)
|
|
if (new && new->ops->attach)
|
|
@@ -1259,7 +1259,7 @@ replay:
|
|
if (q == p ||
|
|
if (q == p ||
|
|
(p && check_loop(q, p, 0)))
|
|
(p && check_loop(q, p, 0)))
|
|
return -ELOOP;
|
|
return -ELOOP;
|
|
- atomic_inc(&q->refcnt);
|
|
|
|
|
|
+ refcount_inc(&q->refcnt);
|
|
goto graft;
|
|
goto graft;
|
|
} else {
|
|
} else {
|
|
if (!q)
|
|
if (!q)
|
|
@@ -1374,7 +1374,7 @@ static int tc_fill_qdisc(struct sk_buff *skb, struct Qdisc *q, u32 clid,
|
|
tcm->tcm_ifindex = qdisc_dev(q)->ifindex;
|
|
tcm->tcm_ifindex = qdisc_dev(q)->ifindex;
|
|
tcm->tcm_parent = clid;
|
|
tcm->tcm_parent = clid;
|
|
tcm->tcm_handle = q->handle;
|
|
tcm->tcm_handle = q->handle;
|
|
- tcm->tcm_info = atomic_read(&q->refcnt);
|
|
|
|
|
|
+ tcm->tcm_info = refcount_read(&q->refcnt);
|
|
if (nla_put_string(skb, TCA_KIND, q->ops->id))
|
|
if (nla_put_string(skb, TCA_KIND, q->ops->id))
|
|
goto nla_put_failure;
|
|
goto nla_put_failure;
|
|
if (q->ops->dump && q->ops->dump(q, skb) < 0)
|
|
if (q->ops->dump && q->ops->dump(q, skb) < 0)
|