aboutsummaryrefslogtreecommitdiffstats
path: root/fs/dlm/recoverd.c
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2006-08-24 15:47:20 -0400
committerSteven Whitehouse <swhiteho@redhat.com>2006-08-25 10:02:53 -0400
commit5f88f1ea16a2fb5f125505053d1bfb7901a88c64 (patch)
treee3d9ce0e01a3903556885c784f8db759c26a795e /fs/dlm/recoverd.c
parent5dc39fe621ead2fa2a0439a686be4df185861eae (diff)
[DLM] add new lockspace to list ealier
When a new lockspace was being created, the recoverd thread was being started for it before the lockspace was added to the global list of lockspaces. The new thread was looking up the lockspace in the global list and sometimes not finding it due to the race with the original thread adding it to the list. We need to add the lockspace to the global list before starting the thread instead of after, and if the new thread can't find the lockspace for some reason, it should return an error. Signed-off-by: David Teigland <teigland@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/dlm/recoverd.c')
-rw-r--r--fs/dlm/recoverd.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/dlm/recoverd.c b/fs/dlm/recoverd.c
index eac8e9fa67f1..362e3eff4dc9 100644
--- a/fs/dlm/recoverd.c
+++ b/fs/dlm/recoverd.c
@@ -234,6 +234,10 @@ static int dlm_recoverd(void *arg)
234 struct dlm_ls *ls; 234 struct dlm_ls *ls;
235 235
236 ls = dlm_find_lockspace_local(arg); 236 ls = dlm_find_lockspace_local(arg);
237 if (!ls) {
238 log_print("dlm_recoverd: no lockspace %p", arg);
239 return -1;
240 }
237 241
238 while (!kthread_should_stop()) { 242 while (!kthread_should_stop()) {
239 set_current_state(TASK_INTERRUPTIBLE); 243 set_current_state(TASK_INTERRUPTIBLE);