Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 150321
b: refs/heads/master
c: 496a60c
h: refs/heads/master
i:
  150319: 086d575
v: v3
  • Loading branch information
Eric W. Biederman authored and David S. Miller committed May 19, 2009
1 parent a02e48b commit e4e1249
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 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: 26574401fef6766f6c3ca25b5c13febe662d2a32
refs/heads/master: 496a60cdcd5d0d884dddf6c3b4ea912923a70f13
9 changes: 6 additions & 3 deletions trunk/drivers/net/bonding/bond_sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,8 @@ static ssize_t bonding_store_slaves(struct device *d,

/* Note: We can't hold bond->lock here, as bond_create grabs it. */

rtnl_lock();
if (!rtnl_trylock())
return restart_syscall();
down_write(&(bonding_rwsem));

sscanf(buffer, "%16s", command); /* IFNAMSIZ*/
Expand Down Expand Up @@ -1171,7 +1172,8 @@ static ssize_t bonding_store_primary(struct device *d,
struct slave *slave;
struct bonding *bond = to_bond(d);

rtnl_lock();
if (!rtnl_trylock())
return restart_syscall();
read_lock(&bond->lock);
write_lock_bh(&bond->curr_slave_lock);

Expand Down Expand Up @@ -1288,7 +1290,8 @@ static ssize_t bonding_store_active_slave(struct device *d,
struct slave *new_active = NULL;
struct bonding *bond = to_bond(d);

rtnl_lock();
if (!rtnl_trylock())
return restart_syscall();
read_lock(&bond->lock);
write_lock_bh(&bond->curr_slave_lock);

Expand Down

0 comments on commit e4e1249

Please sign in to comment.