Commit 283f2fe8 authored by Eric Dumazet's avatar Eric Dumazet Committed by 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: default avatarEric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment