]> Pileus Git - ~andy/linux/blobdiff - drivers/net/bonding/bond_sysfs.c
Merge branch 'driver-core-next' into Linux 3.2
[~andy/linux] / drivers / net / bonding / bond_sysfs.c
index 549742f23ad5cd44bf3346d7c01f32aa33201dea..aef42f045320ae86eed4014835f90ccd786d1586 100644 (file)
@@ -318,6 +318,13 @@ static ssize_t bonding_store_mode(struct device *d,
                goto out;
        }
 
+       if (bond->slave_cnt > 0) {
+               pr_err("unable to update mode of %s because it has slaves.\n",
+                       bond->dev->name);
+               ret = -EPERM;
+               goto out;
+       }
+
        new_value = bond_parse_parm(buf, bond_mode_tbl);
        if (new_value < 0)  {
                pr_err("%s: Ignoring invalid mode value %.*s.\n",