fs: dlm: fix multiple empty writequeue alloc
authorAlexander Aring <aahringo@redhat.com>
Fri, 16 Jul 2021 20:22:44 +0000 (16:22 -0400)
committerDavid Teigland <teigland@redhat.com>
Mon, 19 Jul 2021 16:56:35 +0000 (11:56 -0500)
commitc51b0221798b695ac1beac6597d3a0acf039384b
treea6be241c53eb268bedc7de52732d518db60d9417
parent8728a455d20ddadecd767337475fc1371e031d79
fs: dlm: fix multiple empty writequeue alloc

This patch will add a mutex that a connection can allocate a writequeue
entry buffer only at a sleepable context at one time. If multiple caller
waits at the writequeue spinlock and the spinlock gets release it could
be that multiple new writequeue page buffers were allocated instead of
allocate one writequeue page buffer and other waiters will use remaining
buffer of it. It will only be the case for sleepable context which is
the common case. In non-sleepable contexts like retransmission we just
don't care about such behaviour.

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