Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 376115
b: refs/heads/master
c: ea6836d
h: refs/heads/master
i:
  376113: 621655a
  376111: b8d0a71
v: v3
  • Loading branch information
nikolay@redhat.com authored and David S. Miller committed May 20, 2013
1 parent 5015e09 commit a670a36
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ff0102ee104847023c36357e2b9f133f3f40d211
refs/heads/master: ea6836dd7ef9cfbed5dce421190009f9eed00b7e
4 changes: 4 additions & 0 deletions trunk/drivers/net/bonding/bond_sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,9 @@ static ssize_t bonding_store_mode(struct device *d,
int new_value, ret = count;
struct bonding *bond = to_bond(d);

if (!rtnl_trylock())
return restart_syscall();

if (bond->dev->flags & IFF_UP) {
pr_err("unable to update mode of %s because interface is up.\n",
bond->dev->name);
Expand Down Expand Up @@ -352,6 +355,7 @@ static ssize_t bonding_store_mode(struct device *d,
bond->dev->name, bond_mode_tbl[new_value].modename,
new_value);
out:
rtnl_unlock();
return ret;
}
static DEVICE_ATTR(mode, S_IRUGO | S_IWUSR,
Expand Down

0 comments on commit a670a36

Please sign in to comment.