summaryrefslogtreecommitdiffstats
path: root/drivers/net/bonding/bond_sysfs.c
diff options
context:
space:
mode:
authorsfeldma@cumulusnetworks.com <sfeldma@cumulusnetworks.com>2013-12-17 21:30:23 -0800
committerDavid S. Miller <davem@davemloft.net>2013-12-19 18:32:09 -0500
commit7d1010082785b2020b1e2e1211b76209976a33df (patch)
tree94015cde239f0866b52c4b12167552db3a245264 /drivers/net/bonding/bond_sysfs.c
parent1cc0b1e30c662d84a89690f42826cf49e2278b97 (diff)
downloadop-kernel-dev-7d1010082785b2020b1e2e1211b76209976a33df.zip
op-kernel-dev-7d1010082785b2020b1e2e1211b76209976a33df.tar.gz
bonding: add min_links attribute netlink support
Add IFLA_BOND_MIN_LINKS to allow get/set of bonding parameter min_links via netlink. Signed-off-by: Scott Feldman <sfeldma@cumulusnetworks.com> Signed-off-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bonding/bond_sysfs.c')
-rw-r--r--drivers/net/bonding/bond_sysfs.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c
index 9a37125..359adda 100644
--- a/drivers/net/bonding/bond_sysfs.c
+++ b/drivers/net/bonding/bond_sysfs.c
@@ -722,10 +722,15 @@ static ssize_t bonding_store_min_links(struct device *d,
return ret;
}
- pr_info("%s: Setting min links value to %u\n",
- bond->dev->name, new_value);
- bond->params.min_links = new_value;
- return count;
+ if (!rtnl_trylock())
+ return restart_syscall();
+
+ ret = bond_option_min_links_set(bond, new_value);
+ if (!ret)
+ ret = count;
+
+ rtnl_unlock();
+ return ret;
}
static DEVICE_ATTR(min_links, S_IRUGO | S_IWUSR,
bonding_show_min_links, bonding_store_min_links);
OpenPOWER on IntegriCloud