summaryrefslogtreecommitdiff
path: root/drivers/net/vrf.c
diff options
context:
space:
mode:
authorNikolay Aleksandrov <nikolay@cumulusnetworks.com>2015-08-18 20:28:01 +0300
committerDavid S. Miller <davem@davemloft.net>2015-08-19 06:16:52 +0300
commit17d95f5ee2ba45a9771c97eb1037dfff1d51b064 (patch)
treee469fcba0679d2d4df8b6d24a3d0a1857947abda /drivers/net/vrf.c
parent954591b9f3b43e7015bdd83acaa317658a9b7048 (diff)
downloadlinux-17d95f5ee2ba45a9771c97eb1037dfff1d51b064.tar.xz
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>
Diffstat (limited to 'drivers/net/vrf.c')
-rw-r--r--drivers/net/vrf.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/net/vrf.c b/drivers/net/vrf.c
index 95097cb79354..cd4bc77f2e04 100644
--- a/drivers/net/vrf.c
+++ b/drivers/net/vrf.c
@@ -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++;
}