aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bonding/bond_alb.c
diff options
context:
space:
mode:
authorJay Vosburgh <fubar@us.ibm.com>2007-10-17 20:37:45 -0400
committerJeff Garzik <jeff@garzik.org>2007-10-23 20:32:00 -0400
commit1b76b31693d4a6088dec104ff6a6ead54081a3c2 (patch)
treed6353be6b4654ec85ab6cfe42d2c78fac9a755c8 /drivers/net/bonding/bond_alb.c
parent15df5806c6fc94e607632bba70328194905e988f (diff)
Convert bonding timers to workqueues
Convert bonding timers to workqueues. This converts the various monitor functions to run in periodic work queues instead of timers. This patch introduces the framework and convers the calls, but does not resolve various locking issues, and does not stand alone. Signed-off-by: Andy Gospodarek <andy@greyhouse.net> Signed-off-by: Jay Vosburgh <fubar@us.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/bonding/bond_alb.c')
-rw-r--r--drivers/net/bonding/bond_alb.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c
index aea2217c56eb..eb320c3cbdde 100644
--- a/drivers/net/bonding/bond_alb.c
+++ b/drivers/net/bonding/bond_alb.c
@@ -1375,8 +1375,10 @@ out:
1375 return 0; 1375 return 0;
1376} 1376}
1377 1377
1378void bond_alb_monitor(struct bonding *bond) 1378void bond_alb_monitor(struct work_struct *work)
1379{ 1379{
1380 struct bonding *bond = container_of(work, struct bonding,
1381 alb_work.work);
1380 struct alb_bond_info *bond_info = &(BOND_ALB_INFO(bond)); 1382 struct alb_bond_info *bond_info = &(BOND_ALB_INFO(bond));
1381 struct slave *slave; 1383 struct slave *slave;
1382 int i; 1384 int i;
@@ -1479,7 +1481,7 @@ void bond_alb_monitor(struct bonding *bond)
1479 } 1481 }
1480 1482
1481re_arm: 1483re_arm:
1482 mod_timer(&(bond_info->alb_timer), jiffies + alb_delta_in_ticks); 1484 queue_delayed_work(bond->wq, &bond->alb_work, alb_delta_in_ticks);
1483out: 1485out:
1484 read_unlock(&bond->lock); 1486 read_unlock(&bond->lock);
1485} 1487}