]> git.baikalelectronics.ru Git - kernel.git/commit
fs: dlm: remove wq_alloc mutex
authorAlexander Aring <aahringo@redhat.com>
Tue, 30 Nov 2021 19:47:17 +0000 (14:47 -0500)
committerDavid Teigland <teigland@redhat.com>
Tue, 7 Dec 2021 18:42:26 +0000 (12:42 -0600)
commite70cd7919144a9f8f3532ead1f306ea4c4001425
treec8a131d2ca3fc332b4076bec1fdd6518bba6f773
parenta8ce9bdaa8fd271ae728756450913d13861b5fea
fs: dlm: remove wq_alloc mutex

This patch cleanups the code for allocating a new buffer in the dlm
writequeue mechanism. There was a possible tuneup to allow scheduling
while a new writequeue entry needs to be allocated because either no
sending page is available or are full. To avoid multiple concurrent
users checking at the same time if an entry is available or full
alloc_wq was introduce that those are waiting if there is currently a
new writequeue entry in process to be queued so possible further users
will check on the new allocated writequeue entry if it's full.

To simplify the code we just remove this mutex and switch that the
already introduced spin lock will be held during writequeue check,
allocation and queueing. So other users can never check on available
writequeues while there is a new one in process but not queued yet.

Signed-off-by: Alexander Aring <aahringo@redhat.com>
Signed-off-by: David Teigland <teigland@redhat.com>
fs/dlm/lowcomms.c