From: David Teigland The dlm_recoverd thread for each lockspace uses a recovery timer, so that timer must be per-lockspace, not global. Signed-off-by: David Teigland Signed-off-by: Andrew Morton --- drivers/dlm/dlm_internal.h | 1 + drivers/dlm/recover.c | 16 +++++++--------- 2 files changed, 8 insertions(+), 9 deletions(-) diff -puN drivers/dlm/dlm_internal.h~dlm-recovery-dlm-timer-cant-be-global drivers/dlm/dlm_internal.h --- 25/drivers/dlm/dlm_internal.h~dlm-recovery-dlm-timer-cant-be-global 2005-06-06 00:14:31.000000000 -0700 +++ 25-akpm/drivers/dlm/dlm_internal.h 2005-06-06 00:14:31.000000000 -0700 @@ -469,6 +469,7 @@ struct dlm_ls { /* recovery related */ + struct timer_list ls_timer; wait_queue_head_t ls_wait_member; struct task_struct *ls_recoverd_task; struct semaphore ls_recoverd_active; diff -puN drivers/dlm/recover.c~dlm-recovery-dlm-timer-cant-be-global drivers/dlm/recover.c --- 25/drivers/dlm/recover.c~dlm-recovery-dlm-timer-cant-be-global 2005-06-06 00:14:31.000000000 -0700 +++ 25-akpm/drivers/dlm/recover.c 2005-06-06 00:14:31.000000000 -0700 @@ -22,8 +22,6 @@ #include "lowcomms.h" #include "member.h" -static struct timer_list dlm_timer; - /* * Recovery waiting routines: these functions wait for a particular reply from @@ -50,7 +48,7 @@ int dlm_recovery_stopped(struct dlm_ls * static void dlm_wait_timer_fn(unsigned long data) { struct dlm_ls *ls = (struct dlm_ls *) data; - mod_timer(&dlm_timer, jiffies + (dlm_config.recover_timer * HZ)); + mod_timer(&ls->ls_timer, jiffies + (dlm_config.recover_timer * HZ)); wake_up(&ls->ls_wait_general); } @@ -58,14 +56,14 @@ int dlm_wait_function(struct dlm_ls *ls, { int error = 0; - init_timer(&dlm_timer); - dlm_timer.function = dlm_wait_timer_fn; - dlm_timer.data = (long) ls; - dlm_timer.expires = jiffies + (dlm_config.recover_timer * HZ); - add_timer(&dlm_timer); + init_timer(&ls->ls_timer); + ls->ls_timer.function = dlm_wait_timer_fn; + ls->ls_timer.data = (long) ls; + ls->ls_timer.expires = jiffies + (dlm_config.recover_timer * HZ); + add_timer(&ls->ls_timer); wait_event(ls->ls_wait_general, testfn(ls) || dlm_recovery_stopped(ls)); - del_timer_sync(&dlm_timer); + del_timer_sync(&ls->ls_timer); if (dlm_recovery_stopped(ls)) error = -EINTR; _