]> git.baikalelectronics.ru Git - kernel.git/commit
dlm: check required context while close
authorAlexander Aring <aahringo@redhat.com>
Mon, 4 Apr 2022 20:06:46 +0000 (16:06 -0400)
committerDavid Teigland <teigland@redhat.com>
Wed, 6 Apr 2022 19:03:01 +0000 (14:03 -0500)
commit0e578fb8697206ec845a717ea609c320cdcfd2bd
treec4ddab6fb85656e2274f910aaf476a151273a8e0
parent881274a820bc1431bfb259d9b8d6acdff4ec8848
dlm: check required context while close

This patch adds a WARN_ON() check to validate the right context while
dlm_midcomms_close() is called. Even before commit 85006c531b3a
("fs: dlm: add reliable connection if reconnect") in this context
dlm_lowcomms_close() flushes all ongoing transmission triggered by dlm
application stack. If we do that, it's required that no new message will
be triggered by the dlm application stack. The function
dlm_midcomms_close() is not called often so we can check if all
lockspaces are in such context.

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