Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 283f2fe8 authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller
Browse files

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
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -3757,11 +3757,10 @@ int netdev_set_master(struct net_device *slave, struct net_device *master)

	slave->master = master;

	if (old) {
		synchronize_net();

	if (old)
		dev_put(old);

	}
	if (master)
		slave->flags |= IFF_SLAVE;
	else