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

szülő
6f99528e97
commit
86bd446b5c
@@ -175,7 +175,7 @@ prio_destroy(struct Qdisc *sch)
|
||||
tcf_block_put(q->block);
|
||||
prio_offload(sch, NULL);
|
||||
for (prio = 0; prio < q->bands; prio++)
|
||||
qdisc_destroy(q->queues[prio]);
|
||||
qdisc_put(q->queues[prio]);
|
||||
}
|
||||
|
||||
static int prio_tune(struct Qdisc *sch, struct nlattr *opt,
|
||||
@@ -205,7 +205,7 @@ static int prio_tune(struct Qdisc *sch, struct nlattr *opt,
|
||||
extack);
|
||||
if (!queues[i]) {
|
||||
while (i > oldbands)
|
||||
qdisc_destroy(queues[--i]);
|
||||
qdisc_put(queues[--i]);
|
||||
return -ENOMEM;
|
||||
}
|
||||
}
|
||||
@@ -220,7 +220,7 @@ static int prio_tune(struct Qdisc *sch, struct nlattr *opt,
|
||||
|
||||
qdisc_tree_reduce_backlog(child, child->q.qlen,
|
||||
child->qstats.backlog);
|
||||
qdisc_destroy(child);
|
||||
qdisc_put(child);
|
||||
}
|
||||
|
||||
for (i = oldbands; i < q->bands; i++) {
|
||||
|
Reference in New Issue
Block a user