Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 202630
b: refs/heads/master
c: 3dd9090
h: refs/heads/master
v: v3
  • Loading branch information
Jiri Pirko authored and David S. Miller committed Jun 2, 2010
1 parent ace2c14 commit f5364ef
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 20 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b15ba0fbdc2e54c3885fed91c54aeef7fe474033
refs/heads/master: 3dd90905e08655aa7754f08ebe8b1f44e2793074
20 changes: 1 addition & 19 deletions trunk/drivers/net/bonding/bond_sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ static ssize_t bonding_store_slaves(struct device *d,

if (command[0] == '+') {

/* Got a slave name in ifname. Is it already in the list? */
/* Got a slave name in ifname. */

dev = __dev_get_by_name(dev_net(bond->dev), ifname);
if (!dev) {
Expand All @@ -253,24 +253,6 @@ static ssize_t bonding_store_slaves(struct device *d,
goto out;
}

if (dev->flags & IFF_UP) {
pr_err("%s: Error: Unable to enslave %s because it is already up.\n",
bond->dev->name, dev->name);
ret = -EPERM;
goto out;
}

read_lock(&bond->lock);
bond_for_each_slave(bond, slave, i)
if (slave->dev == dev) {
pr_err("%s: Interface %s is already enslaved!\n",
bond->dev->name, ifname);
ret = -EPERM;
read_unlock(&bond->lock);
goto out;
}
read_unlock(&bond->lock);

pr_info("%s: Adding slave %s.\n", bond->dev->name, ifname);

/* If this is the first slave, then we need to set
Expand Down

0 comments on commit f5364ef

Please sign in to comment.