提交 33d36bb8 编写于 作者: A Alexey Dobriyan 提交者: David S. Miller

[NETNS]: init dev_base_lock only once

* it already statically initialized
* reinitializing live global spinlock every time netns is
  setup is also wrong
Signed-off-by: NAlexey Dobriyan <adobriyan@sw.ru>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 284b327b
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册