Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 72433
b: refs/heads/master
c: d0e81b7
h: refs/heads/master
i:
  72431: e0aebd2
v: v3
  • Loading branch information
Jay Vosburgh authored and Jeff Garzik committed Oct 24, 2007
1 parent 1a48983 commit 7ec4459
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 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: 6603a6f25e4bca922a7dfbf0bf03072d98850176
refs/heads/master: d0e81b7e2246a41d068ecaf15aac9de570816d63
19 changes: 10 additions & 9 deletions trunk/drivers/net/bonding/bond_alb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1455,16 +1455,16 @@ void bond_alb_monitor(struct work_struct *work)

/* handle rlb stuff */
if (bond_info->rlb_enabled) {
/* the following code changes the promiscuity of the
* the curr_active_slave. It needs to be locked with a
* write lock to protect from other code that also
* sets the promiscuity.
*/
write_lock_bh(&bond->curr_slave_lock);

if (bond_info->primary_is_promisc &&
(++bond_info->rlb_promisc_timeout_counter >= RLB_PROMISC_TIMEOUT)) {

/*
* dev_set_promiscuity requires rtnl and
* nothing else.
*/
read_unlock(&bond->lock);
rtnl_lock();

bond_info->rlb_promisc_timeout_counter = 0;

/* If the primary was set to promiscuous mode
Expand All @@ -1473,9 +1473,10 @@ void bond_alb_monitor(struct work_struct *work)
*/
dev_set_promiscuity(bond->curr_active_slave->dev, -1);
bond_info->primary_is_promisc = 0;
}

write_unlock_bh(&bond->curr_slave_lock);
rtnl_unlock();
read_lock(&bond->lock);
}

if (bond_info->rlb_rebalance) {
bond_info->rlb_rebalance = 0;
Expand Down

0 comments on commit 7ec4459

Please sign in to comment.