提交 283f2fe8 编写于 作者: E Eric Dumazet 提交者: David S. Miller

net: speedup netdev_set_master()

We currently force a synchronize_net() in netdev_set_master()

This seems necessary only when a slave had a master and we dismantle it.

In the other case ("ifenslave bond0 ethO"), we dont need this long
delay.
Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 907cdda5
......@@ -3757,11 +3757,10 @@ int netdev_set_master(struct net_device *slave, struct net_device *master)
slave->master = master;
synchronize_net();
if (old)
if (old) {
synchronize_net();
dev_put(old);
}
if (master)
slave->flags |= IFF_SLAVE;
else
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册