Commit 08f0b22d authored by Eric Dumazet's avatar Eric Dumazet Committed by Jakub Kicinski

net: eql: add net device refcount tracker

Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 59d58d93
......@@ -225,7 +225,7 @@ static void eql_kill_one_slave(slave_queue_t *queue, slave_t *slave)
list_del(&slave->list);
queue->num_slaves--;
slave->dev->flags &= ~IFF_SLAVE;
dev_put(slave->dev);
dev_put_track(slave->dev, &slave->dev_tracker);
kfree(slave);
}
......@@ -399,7 +399,7 @@ static int __eql_insert_slave(slave_queue_t *queue, slave_t *slave)
if (duplicate_slave)
eql_kill_one_slave(queue, duplicate_slave);
dev_hold(slave->dev);
dev_hold_track(slave->dev, &slave->dev_tracker, GFP_ATOMIC);
list_add(&slave->list, &queue->all_slaves);
queue->num_slaves++;
slave->dev->flags |= IFF_SLAVE;
......
......@@ -26,6 +26,7 @@
typedef struct slave {
struct list_head list;
struct net_device *dev;
netdevice_tracker dev_tracker;
long priority;
long priority_bps;
long priority_Bps;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment