summaryrefslogtreecommitdiffstats
path: root/drivers/net/bonding/bond_main.c
diff options
context:
space:
mode:
authornikolay@redhat.com2013-06-26 17:13:37 +0200
committerDavid S. Miller2013-06-28 07:50:15 +0200
commit8d2ada77f8a7f8f65fcbf71b23cbac54b64151a6 (patch)
treebf48e3ada33e8b2cc151c3a23adef15e188d85eb /drivers/net/bonding/bond_main.c
parentnetlink: fix splat in skb_clone with large messages (diff)
downloadkernel-qcow2-linux-8d2ada77f8a7f8f65fcbf71b23cbac54b64151a6.tar.gz
kernel-qcow2-linux-8d2ada77f8a7f8f65fcbf71b23cbac54b64151a6.tar.xz
kernel-qcow2-linux-8d2ada77f8a7f8f65fcbf71b23cbac54b64151a6.zip
bonding: remove unnecessary setup_by_slave member
We have a member called setup_by_slave in struct bonding to denote if the bond dev has different type than ARPHRD_ETHER, but that is already denoted in bond's netdev type variable if it was setup by the slave, so use that instead of the member. Signed-off-by: Nikolay Aleksandrov <nikolay@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bonding/bond_main.c')
-rw-r--r--drivers/net/bonding/bond_main.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 142d55dc526e..2e8b9f1e2747 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -1382,8 +1382,6 @@ done:
static void bond_setup_by_slave(struct net_device *bond_dev,
struct net_device *slave_dev)
{
- struct bonding *bond = netdev_priv(bond_dev);
-
bond_dev->header_ops = slave_dev->header_ops;
bond_dev->type = slave_dev->type;
@@ -1392,7 +1390,6 @@ static void bond_setup_by_slave(struct net_device *bond_dev,
memcpy(bond_dev->broadcast, slave_dev->broadcast,
slave_dev->addr_len);
- bond->setup_by_slave = 1;
}
/* On bonding slaves other than the currently active slave, suppress
@@ -3187,7 +3184,7 @@ static int bond_slave_netdev_event(unsigned long event,
switch (event) {
case NETDEV_UNREGISTER:
- if (bond->setup_by_slave)
+ if (bond_dev->type != ARPHRD_ETHER)
bond_release_and_destroy(bond_dev, slave_dev);
else
bond_release(bond_dev, slave_dev);