提交 08f0b22d 编写于 作者: E Eric Dumazet 提交者: Jakub Kicinski

net: eql: add net device refcount tracker

Signed-off-by: NEric Dumazet <edumazet@google.com>
Signed-off-by: NJakub Kicinski <kuba@kernel.org>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册