Skip to content

Commit

Permalink
[NETNS]: init dev_base_lock only once
Browse files Browse the repository at this point in the history
* it already statically initialized
* reinitializing live global spinlock every time netns is
  setup is also wrong

Signed-off-by: Alexey Dobriyan <adobriyan@sw.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Alexey Dobriyan authored and David S. Miller committed Nov 11, 2007
1 parent 284b327 commit 33d36bb
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -4330,7 +4330,6 @@ static struct hlist_head *netdev_create_hash(void)
static int __net_init netdev_init(struct net *net)
{
INIT_LIST_HEAD(&net->dev_base_head);
rwlock_init(&dev_base_lock);

net->dev_name_head = netdev_create_hash();
if (net->dev_name_head == NULL)
Expand Down

0 comments on commit 33d36bb

Please sign in to comment.