diff options
author | Alexander Aring <aahringo@redhat.com> | 2024-04-02 15:18:09 -0400 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2024-04-09 11:45:23 -0500 |
commit | 578acf9a87a87531df5b59b3799ccc1256a4bbcc (patch) | |
tree | 9354ed57d97ee78616e338e5f566ce5fe4a9a0b7 /fs/dlm/requestqueue.c | |
parent | 308533b4b1d55892d939286313fb73c1527444ce (diff) |
dlm: use spin_lock_bh for message processing
Use spin_lock_bh for all spinlocks involved in message processing,
in preparation for softirq message processing. DLM lock requests
from user space involve dlm processing in user context, in addition
to the standard kernel context, necessitating bh variants.
Signed-off-by: Alexander Aring <aahringo@redhat.com>
Signed-off-by: David Teigland <teigland@redhat.com>
Diffstat (limited to 'fs/dlm/requestqueue.c')
-rw-r--r-- | fs/dlm/requestqueue.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/dlm/requestqueue.c b/fs/dlm/requestqueue.c index 9b646026df46..719a5243a069 100644 --- a/fs/dlm/requestqueue.c +++ b/fs/dlm/requestqueue.c @@ -68,7 +68,7 @@ int dlm_process_requestqueue(struct dlm_ls *ls) struct dlm_message *ms; int error = 0; - write_lock(&ls->ls_requestqueue_lock); + write_lock_bh(&ls->ls_requestqueue_lock); for (;;) { if (list_empty(&ls->ls_requestqueue)) { clear_bit(LSFL_RECV_MSG_BLOCKED, &ls->ls_flags); @@ -96,11 +96,11 @@ int dlm_process_requestqueue(struct dlm_ls *ls) error = -EINTR; break; } - write_unlock(&ls->ls_requestqueue_lock); + write_unlock_bh(&ls->ls_requestqueue_lock); schedule(); - write_lock(&ls->ls_requestqueue_lock); + write_lock_bh(&ls->ls_requestqueue_lock); } - write_unlock(&ls->ls_requestqueue_lock); + write_unlock_bh(&ls->ls_requestqueue_lock); return error; } @@ -135,7 +135,7 @@ void dlm_purge_requestqueue(struct dlm_ls *ls) struct dlm_message *ms; struct rq_entry *e, *safe; - write_lock(&ls->ls_requestqueue_lock); + write_lock_bh(&ls->ls_requestqueue_lock); list_for_each_entry_safe(e, safe, &ls->ls_requestqueue, list) { ms = &e->request; @@ -144,6 +144,6 @@ void dlm_purge_requestqueue(struct dlm_ls *ls) kfree(e); } } - write_unlock(&ls->ls_requestqueue_lock); + write_unlock_bh(&ls->ls_requestqueue_lock); } |