summaryrefslogtreecommitdiffstats
path: root/fs/dlm/recoverd.c
diff options
context:
space:
mode:
authorAlexander Aring <aahringo@redhat.com>2024-04-02 21:18:07 +0200
committerDavid Teigland <teigland@redhat.com>2024-04-09 18:44:49 +0200
commitd52c9b8fefa3ed4f1893eea8c5f38748a83356fc (patch)
tree0e27a57edffd8c6549a4992e38ddb66a3031a197 /fs/dlm/recoverd.c
parentdlm: avoid blocking receive at the end of recovery (diff)
downloadlinux-d52c9b8fefa3ed4f1893eea8c5f38748a83356fc.tar.xz
linux-d52c9b8fefa3ed4f1893eea8c5f38748a83356fc.zip
dlm: convert ls_recv_active from rw_semaphore to rwlock
Convert ls_recv_active rw_semaphore to an rwlock to avoid sleeping, in preparation for softirq message processing. Signed-off-by: Alexander Aring <aahringo@redhat.com> Signed-off-by: David Teigland <teigland@redhat.com>
Diffstat (limited to 'fs/dlm/recoverd.c')
-rw-r--r--fs/dlm/recoverd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/dlm/recoverd.c b/fs/dlm/recoverd.c
index 0b1a62167798..a11ae1da2f60 100644
--- a/fs/dlm/recoverd.c
+++ b/fs/dlm/recoverd.c
@@ -103,7 +103,7 @@ static int enable_locking(struct dlm_ls *ls, uint64_t seq)
{
int error = -EINTR;
- down_write(&ls->ls_recv_active);
+ write_lock(&ls->ls_recv_active);
spin_lock(&ls->ls_recover_lock);
if (ls->ls_recover_seq == seq) {
@@ -115,7 +115,7 @@ static int enable_locking(struct dlm_ls *ls, uint64_t seq)
}
spin_unlock(&ls->ls_recover_lock);
- up_write(&ls->ls_recv_active);
+ write_unlock(&ls->ls_recv_active);
return error;
}