diff options
author | Alexander Aring <aahringo@redhat.com> | 2022-10-27 22:45:19 +0200 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2022-11-08 19:59:41 +0100 |
commit | 92e95733307e7b6dd352c12fa174089ed51e7208 (patch) | |
tree | be0513dd02a0ea114adec2095304485c27f2bc20 /fs/dlm/lock.c | |
parent | fs: dlm: convert ls_cb_mutex mutex to spinlock (diff) | |
download | linux-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.c | 2 |
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); |