]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
bonding: remove rtmsg_ifinfo called in bond_master_upper_dev_link
authorXin Long <lucien.xin@gmail.com>
Tue, 24 Oct 2017 05:54:18 +0000 (13:54 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 25 Oct 2017 01:54:39 +0000 (10:54 +0900)
Since commit 42e52bf9e3ae ("net: add netnotifier event for upper device
change"), netdev_master_upper_dev_link has generated NETDEV_CHANGEUPPER
event which would send a notification to userspace in rtnetlink_event.

There's no need to call rtmsg_ifinfo to send the notification any more.
So this patch is to remove it from bond_master_upper_dev_link as well
as bond_upper_dev_unlink to avoid the redundant notifications.

Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/bonding/bond_main.c

index 172eeeb68152b039820edbfaf7d5667f15e42192..18b58e1376f1695c923f478efa1c90a0aa9204bd 100644 (file)
@@ -1221,22 +1221,17 @@ static int bond_master_upper_dev_link(struct bonding *bond, struct slave *slave,
                                      struct netlink_ext_ack *extack)
 {
        struct netdev_lag_upper_info lag_upper_info;
-       int err;
 
        lag_upper_info.tx_type = bond_lag_tx_type(bond);
-       err = netdev_master_upper_dev_link(slave->dev, bond->dev, slave,
-                                          &lag_upper_info, extack);
-       if (err)
-               return err;
-       rtmsg_ifinfo(RTM_NEWLINK, slave->dev, IFF_SLAVE, GFP_KERNEL);
-       return 0;
+
+       return netdev_master_upper_dev_link(slave->dev, bond->dev, slave,
+                                           &lag_upper_info, extack);
 }
 
 static void bond_upper_dev_unlink(struct bonding *bond, struct slave *slave)
 {
        netdev_upper_dev_unlink(slave->dev, bond->dev);
        slave->dev->flags &= ~IFF_SLAVE;
-       rtmsg_ifinfo(RTM_NEWLINK, slave->dev, IFF_SLAVE, GFP_KERNEL);
 }
 
 static struct slave *bond_alloc_slave(struct bonding *bond)