vrf: drop unnecessary dev refcnt changes
authorNikolay Aleksandrov <nikolay@cumulusnetworks.com>
Tue, 18 Aug 2015 17:28:01 +0000 (20:28 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 19 Aug 2015 03:16:52 +0000 (20:16 -0700)
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>
drivers/net/vrf.c

index 95097cb793540d292e244408ef441d4612e67bb7..cd4bc77f2e045788ac1d05a7d0ace9ca139becb6 100644 (file)
@@ -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++;
 }