summaryrefslogtreecommitdiffstats
path: root/fs/dlm/lock.c
diff options
context:
space:
mode:
authorAlexander Aring <aahringo@redhat.com>2022-10-27 22:45:19 +0200
committerDavid Teigland <teigland@redhat.com>2022-11-08 19:59:41 +0100
commit92e95733307e7b6dd352c12fa174089ed51e7208 (patch)
treebe0513dd02a0ea114adec2095304485c27f2bc20 /fs/dlm/lock.c
parentfs: dlm: convert ls_cb_mutex mutex to spinlock (diff)
downloadlinux-92e95733307e7b6dd352c12fa174089ed51e7208.tar.xz
linux-92e95733307e7b6dd352c12fa174089ed51e7208.zip
fs: dlm: use spin lock instead of mutex
There is no need to use a mutex in those hot path sections. We change it to spin lock to serve callbacks more faster by not allowing schedule. The locked sections will not be locked for a long time. Signed-off-by: Alexander Aring <aahringo@redhat.com> Signed-off-by: David Teigland <teigland@redhat.com>
Diffstat (limited to 'fs/dlm/lock.c')
-rw-r--r--fs/dlm/lock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/dlm/lock.c b/fs/dlm/lock.c
index 0b1bc24536ce..40e4e4a1c582 100644
--- a/fs/dlm/lock.c
+++ b/fs/dlm/lock.c
@@ -1218,7 +1218,7 @@ static int _create_lkb(struct dlm_ls *ls, struct dlm_lkb **lkb_ret,
INIT_LIST_HEAD(&lkb->lkb_time_list);
#endif
INIT_LIST_HEAD(&lkb->lkb_cb_list);
- mutex_init(&lkb->lkb_cb_mutex);
+ spin_lock_init(&lkb->lkb_cb_lock);
INIT_WORK(&lkb->lkb_cb_work, dlm_callback_work);
idr_preload(GFP_NOFS);