Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 144585
b: refs/heads/master
c: 689c96c
h: refs/heads/master
i:
  144583: c6e6ef9
v: v3
  • Loading branch information
Eric Dumazet authored and David S. Miller committed May 1, 2009
1 parent a0c6a80 commit e35ccdc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 17 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: 00b64f2aa5e8741b49e48ebad1116cc78dbbf0fd
refs/heads/master: 689c96cca7ec3d2ba7fba00481810f99f1803c63
23 changes: 7 additions & 16 deletions trunk/drivers/net/bonding/bond_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2213,33 +2213,24 @@ static int bond_slave_info_query(struct net_device *bond_dev, struct ifslave *in
{
struct bonding *bond = netdev_priv(bond_dev);
struct slave *slave;
int i, found = 0;

if (info->slave_id < 0) {
return -ENODEV;
}
int i, res = -ENODEV;

read_lock(&bond->lock);

bond_for_each_slave(bond, slave, i) {
if (i == (int)info->slave_id) {
found = 1;
res = 0;
strcpy(info->slave_name, slave->dev->name);
info->link = slave->link;
info->state = slave->state;
info->link_failure_count = slave->link_failure_count;
break;
}
}

read_unlock(&bond->lock);

if (found) {
strcpy(info->slave_name, slave->dev->name);
info->link = slave->link;
info->state = slave->state;
info->link_failure_count = slave->link_failure_count;
} else {
return -ENODEV;
}

return 0;
return res;
}

/*-------------------------------- Monitoring -------------------------------*/
Expand Down

0 comments on commit e35ccdc

Please sign in to comment.