diff options
author | Vlad Buslov <vladbu@mellanox.com> | 2018-09-24 18:22:50 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-09-26 05:17:35 +0200 |
commit | 86bd446b5cebd783187ea3772ff258210de77d99 (patch) | |
tree | a628c33098ece5577e51cdbe871fd5f97a5a064e /net/sched/sch_mqprio.c | |
parent | net: core: netlink: add helper refcount dec and lock function (diff) | |
download | linux-86bd446b5cebd783187ea3772ff258210de77d99.tar.xz linux-86bd446b5cebd783187ea3772ff258210de77d99.zip |
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>
Diffstat (limited to 'net/sched/sch_mqprio.c')
-rw-r--r-- | net/sched/sch_mqprio.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/sched/sch_mqprio.c b/net/sched/sch_mqprio.c index 0e9d761cdd80..d364e63c396d 100644 --- a/net/sched/sch_mqprio.c +++ b/net/sched/sch_mqprio.c @@ -40,7 +40,7 @@ static void mqprio_destroy(struct Qdisc *sch) for (ntx = 0; ntx < dev->num_tx_queues && priv->qdiscs[ntx]; ntx++) - qdisc_destroy(priv->qdiscs[ntx]); + qdisc_put(priv->qdiscs[ntx]); kfree(priv->qdiscs); } @@ -300,7 +300,7 @@ static void mqprio_attach(struct Qdisc *sch) qdisc = priv->qdiscs[ntx]; old = dev_graft_qdisc(qdisc->dev_queue, qdisc); if (old) - qdisc_destroy(old); + qdisc_put(old); if (ntx < dev->real_num_tx_queues) qdisc_hash_add(qdisc, false); } |