Commit 700b0480 authored by Alexander Aring's avatar Alexander Aring Committed by David Teigland

dlm: increment ls_count for dlm_scand

Increment the ls_count value while dlm_scand is processing a
lockspace so that release_lockspace()/remove_lockspace() will
wait for dlm_scand to finish.
Signed-off-by: default avatarAlexander Aring <aahringo@redhat.com>
Signed-off-by: default avatarDavid Teigland <teigland@redhat.com>
parent 92d59adf
...@@ -255,6 +255,7 @@ static struct dlm_ls *find_ls_to_scan(void) ...@@ -255,6 +255,7 @@ static struct dlm_ls *find_ls_to_scan(void)
list_for_each_entry(ls, &lslist, ls_list) { list_for_each_entry(ls, &lslist, ls_list) {
if (time_after_eq(jiffies, ls->ls_scan_time + if (time_after_eq(jiffies, ls->ls_scan_time +
dlm_config.ci_scan_secs * HZ)) { dlm_config.ci_scan_secs * HZ)) {
atomic_inc(&ls->ls_count);
spin_unlock_bh(&lslist_lock); spin_unlock_bh(&lslist_lock);
return ls; return ls;
} }
...@@ -277,6 +278,8 @@ static int dlm_scand(void *data) ...@@ -277,6 +278,8 @@ static int dlm_scand(void *data)
} else { } else {
ls->ls_scan_time += HZ; ls->ls_scan_time += HZ;
} }
dlm_put_lockspace(ls);
continue; continue;
} }
schedule_timeout_interruptible(dlm_config.ci_scan_secs * HZ); schedule_timeout_interruptible(dlm_config.ci_scan_secs * HZ);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment