diff options
author | sfeldma@cumulusnetworks.com <sfeldma@cumulusnetworks.com> | 2013-12-18 09:30:23 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-12-20 03:32:09 +0400 |
commit | 7d1010082785b2020b1e2e1211b76209976a33df (patch) | |
tree | 94015cde239f0866b52c4b12167552db3a245264 /drivers/net/bonding/bond_sysfs.c | |
parent | 1cc0b1e30c662d84a89690f42826cf49e2278b97 (diff) | |
download | linux-7d1010082785b2020b1e2e1211b76209976a33df.tar.xz |
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.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c index 9a3712513932..359adda17dba 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); |