aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/dev.c
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2010-03-18 09:37:40 -0400
committerDavid S. Miller <davem@davemloft.net>2010-03-21 21:34:15 -0400
commit283f2fe87e980d8af5ad8aa63751e7e3258ee05a (patch)
tree43876fc3958a8c59cd4fd7a7815ed8fd56dcd84b /net/core/dev.c
parent907cdda5205b012eec7513f66713749b293188c9 (diff)
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: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/dev.c')
-rw-r--r--net/core/dev.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index fe2a754238a9..2d01f18f303a 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -3757,11 +3757,10 @@ int netdev_set_master(struct net_device *slave, struct net_device *master)
3757 3757
3758 slave->master = master; 3758 slave->master = master;
3759 3759
3760 synchronize_net(); 3760 if (old) {
3761 3761 synchronize_net();
3762 if (old)
3763 dev_put(old); 3762 dev_put(old);
3764 3763 }
3765 if (master) 3764 if (master)
3766 slave->flags |= IFF_SLAVE; 3765 slave->flags |= IFF_SLAVE;
3767 else 3766 else