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
@@ -1022,7 +1022,7 @@ static void netem_destroy(struct Qdisc *sch)
|
||||
|
||||
qdisc_watchdog_cancel(&q->watchdog);
|
||||
if (q->qdisc)
|
||||
qdisc_destroy(q->qdisc);
|
||||
qdisc_put(q->qdisc);
|
||||
dist_free(q->delay_dist);
|
||||
dist_free(q->slot_dist);
|
||||
}
|
||||
|
Reference in New Issue
Block a user