summaryrefslogtreecommitdiffstats
path: root/fs/dlm
diff options
context:
space:
mode:
authorAlexander Aring <aahringo@redhat.com>2024-04-15 20:39:35 +0200
committerDavid Teigland <teigland@redhat.com>2024-04-16 20:42:45 +0200
commit700b04808fad2eac24abf050f234f059199fa3fe (patch)
tree9d5ed81a5afe16b6ca63d65551f677c3bfe11e28 /fs/dlm
parentdlm: do message processing in softirq context (diff)
downloadlinux-700b04808fad2eac24abf050f234f059199fa3fe.tar.xz
linux-700b04808fad2eac24abf050f234f059199fa3fe.zip
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>
Diffstat (limited to 'fs/dlm')
-rw-r--r--fs/dlm/lockspace.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/dlm/lockspace.c b/fs/dlm/lockspace.c
index c3681a50decb..731c48371a27 100644
--- a/fs/dlm/lockspace.c
+++ b/fs/dlm/lockspace.c
@@ -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);