mirror of
https://github.com/torvalds/linux.git
synced 2026-05-30 10:04:04 +02:00
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: Alexander Aring <aahringo@redhat.com> Signed-off-by: David Teigland <teigland@redhat.com>
This commit is contained in:
parent
92d59adfaf
commit
700b04808f
|
|
@ -255,6 +255,7 @@ static struct dlm_ls *find_ls_to_scan(void)
|
|||
list_for_each_entry(ls, &lslist, ls_list) {
|
||||
if (time_after_eq(jiffies, ls->ls_scan_time +
|
||||
dlm_config.ci_scan_secs * HZ)) {
|
||||
atomic_inc(&ls->ls_count);
|
||||
spin_unlock_bh(&lslist_lock);
|
||||
return ls;
|
||||
}
|
||||
|
|
@ -277,6 +278,8 @@ static int dlm_scand(void *data)
|
|||
} else {
|
||||
ls->ls_scan_time += HZ;
|
||||
}
|
||||
|
||||
dlm_put_lockspace(ls);
|
||||
continue;
|
||||
}
|
||||
schedule_timeout_interruptible(dlm_config.ci_scan_secs * HZ);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user