[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1439918884-13681-2-git-send-email-razor@blackwall.org>
Date: Tue, 18 Aug 2015 20:28:01 +0300
From: Nikolay Aleksandrov <razor@...ckwall.org>
To: netdev@...r.kernel.org
Cc: dsa@...ulusnetworks.com, shm@...ulusnetworks.com,
davem@...emloft.net,
Nikolay Aleksandrov <nikolay@...ulusnetworks.com>
Subject: [PATCH net-next 1/4] vrf: drop unnecessary dev refcnt changes
From: Nikolay Aleksandrov <nikolay@...ulusnetworks.com>
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@...ulusnetworks.com>
---
drivers/net/vrf.c | 2 --
1 file changed, 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++;
}
--
2.4.3
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists