net: sched: rename qdisc_destroy() to qdisc_put()
Current implementation of qdisc_destroy() decrements Qdisc reference counter and only actually destroy Qdisc if reference counter value reached zero. Rename qdisc_destroy() to qdisc_put() in order for it to better describe the way in which this function currently implemented and used. Extract code that deallocates Qdisc into new private qdisc_destroy() function. It is intended to be shared between regular qdisc_put() and its unlocked version that is introduced in next patch in this series. Signed-off-by: Vlad Buslov <vladbu@mellanox.com> Acked-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
6f99528e97
commit
86bd446b5c
@@ -469,7 +469,7 @@ static void sfb_destroy(struct Qdisc *sch)
|
||||
struct sfb_sched_data *q = qdisc_priv(sch);
|
||||
|
||||
tcf_block_put(q->block);
|
||||
qdisc_destroy(q->qdisc);
|
||||
qdisc_put(q->qdisc);
|
||||
}
|
||||
|
||||
static const struct nla_policy sfb_policy[TCA_SFB_MAX + 1] = {
|
||||
@@ -523,7 +523,7 @@ static int sfb_change(struct Qdisc *sch, struct nlattr *opt,
|
||||
|
||||
qdisc_tree_reduce_backlog(q->qdisc, q->qdisc->q.qlen,
|
||||
q->qdisc->qstats.backlog);
|
||||
qdisc_destroy(q->qdisc);
|
||||
qdisc_put(q->qdisc);
|
||||
q->qdisc = child;
|
||||
|
||||
q->rehash_interval = msecs_to_jiffies(ctl->rehash_interval);
|
||||
|
Reference in New Issue
Block a user