summaryrefslogtreecommitdiffstats
path: root/fs/dlm/lockspace.c
diff options
context:
space:
mode:
authorAlexander Aring <aahringo@redhat.com>2024-06-03 23:55:54 +0200
committerDavid Teigland <teigland@redhat.com>2024-06-11 19:50:30 +0200
commitd3d85e9ad55b973eff3641dd3a61990a2c810785 (patch)
tree712afc890bf3a88343c0961ede72ad9aa4a12f2c /fs/dlm/lockspace.c
parentdlm: use rcu to avoid an extra rsb struct lookup (diff)
downloadlinux-d3d85e9ad55b973eff3641dd3a61990a2c810785.tar.xz
linux-d3d85e9ad55b973eff3641dd3a61990a2c810785.zip
dlm: use LSFL_FS to check for kernel lockspace
The existing external lockspace flag DLM_LSFL_FS is now also saved as an internal flag LSFL_FS, so it can be checked from other code locations which want to know if a lockspace is used from the kernel or user space. Signed-off-by: Alexander Aring <aahringo@redhat.com> Signed-off-by: David Teigland <teigland@redhat.com>
Diffstat (limited to 'fs/dlm/lockspace.c')
-rw-r--r--fs/dlm/lockspace.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/fs/dlm/lockspace.c b/fs/dlm/lockspace.c
index 3990880faea7..8a4351ee9a42 100644
--- a/fs/dlm/lockspace.c
+++ b/fs/dlm/lockspace.c
@@ -499,12 +499,13 @@ static int new_lockspace(const char *name, const char *cluster,
list_add(&ls->ls_list, &lslist);
spin_unlock_bh(&lslist_lock);
- if (flags & DLM_LSFL_FS) {
- error = dlm_callback_start(ls);
- if (error) {
- log_error(ls, "can't start dlm_callback %d", error);
- goto out_delist;
- }
+ if (flags & DLM_LSFL_FS)
+ set_bit(LSFL_FS, &ls->ls_flags);
+
+ error = dlm_callback_start(ls);
+ if (error) {
+ log_error(ls, "can't start dlm_callback %d", error);
+ goto out_delist;
}
init_waitqueue_head(&ls->ls_recover_lock_wait);