summaryrefslogtreecommitdiff
path: root/drivers/net/bonding/bond_main.c
diff options
context:
space:
mode:
authorDmitry Shmidt <dimitrysh@google.com>2016-10-10 12:43:03 -0700
committerDmitry Shmidt <dimitrysh@google.com>2016-10-10 12:43:03 -0700
commit09f6247a9ccaffcc9af1e4a9038e14ecdb76a79d (patch)
treef28f9f114c1aab70185f424ec2be689d1e6cbd3b /drivers/net/bonding/bond_main.c
parent8760f8e3d9806a940d759c9e12fff7eb7130b9ab (diff)
parentd19e48fe5da7b83d02ed4aec3567f08ae02a168c (diff)
Merge tag 'v4.4.23' into android-4.4.y
This is the 4.4.23 stable release
Diffstat (limited to 'drivers/net/bonding/bond_main.c')
-rw-r--r--drivers/net/bonding/bond_main.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index b3d70a7a5262..5dca77e0ffed 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -1317,9 +1317,10 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev)
slave_dev->name);
}
- /* already enslaved */
- if (slave_dev->flags & IFF_SLAVE) {
- netdev_dbg(bond_dev, "Error: Device was already enslaved\n");
+ /* already in-use? */
+ if (netdev_is_rx_handler_busy(slave_dev)) {
+ netdev_err(bond_dev,
+ "Error: Device is in use and cannot be enslaved\n");
return -EBUSY;
}