diff options
author | Eric Dumazet <edumazet@google.com> | 2021-12-05 07:22:13 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2021-12-07 03:05:12 +0300 |
commit | 606509f27f67748b92f783a75a6e39cfaa2fe92d (patch) | |
tree | 15b7e006aad92180f02da94a9d6c6be7f03054d5 /net/sched/sch_generic.c | |
parent | c04438f58d140723e58050fcb9d33d84cb39e9e9 (diff) | |
download | linux-606509f27f67748b92f783a75a6e39cfaa2fe92d.tar.xz |
net/sched: add net device refcount tracker to struct Qdisc
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/sched/sch_generic.c')
-rw-r--r-- | net/sched/sch_generic.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c index d33804d41c5c..8c8fbf2e3856 100644 --- a/net/sched/sch_generic.c +++ b/net/sched/sch_generic.c @@ -973,7 +973,7 @@ struct Qdisc *qdisc_alloc(struct netdev_queue *dev_queue, sch->enqueue = ops->enqueue; sch->dequeue = ops->dequeue; sch->dev_queue = dev_queue; - dev_hold(dev); + dev_hold_track(dev, &sch->dev_tracker, GFP_KERNEL); refcount_set(&sch->refcnt, 1); return sch; @@ -1073,7 +1073,7 @@ static void qdisc_destroy(struct Qdisc *qdisc) ops->destroy(qdisc); module_put(ops->owner); - dev_put(qdisc_dev(qdisc)); + dev_put_track(qdisc_dev(qdisc), &qdisc->dev_tracker); trace_qdisc_destroy(qdisc); |