vrf: drop unnecessary dev refcnt changes

netdev_master_upper_dev_link/unlink already do a dev_hold/put on the
devices being linked, so no need to take another reference.

Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Nikolay Aleksandrov 2015-08-18 20:28:01 +03:00 коммит произвёл David S. Miller
Родитель 954591b9f3
Коммит 17d95f5ee2
1 изменённых файлов: 0 добавлений и 2 удалений

Просмотреть файл

@ -334,14 +334,12 @@ static struct slave *__vrf_find_slave_dev(struct slave_queue *queue,
/* inverse of __vrf_insert_slave */
static void __vrf_remove_slave(struct slave_queue *queue, struct slave *slave)
{
dev_put(slave->dev);
list_del(&slave->list);
queue->num_slaves--;
}
static void __vrf_insert_slave(struct slave_queue *queue, struct slave *slave)
{
dev_hold(slave->dev);
list_add(&slave->list, &queue->all_slaves);
queue->num_slaves++;
}