]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
fs: dlm: cancel work sync othercon
authorAlexander Aring <aahringo@redhat.com>
Fri, 21 May 2021 19:08:38 +0000 (15:08 -0400)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 13 Aug 2021 07:45:15 +0000 (09:45 +0200)
BugLink: https://bugs.launchpad.net/bugs/1938199
[ Upstream commit c6aa00e3d20c2767ba3f57b64eb862572b9744b3 ]

These rx tx flags arguments are for signaling close_connection() from
which worker they are called. Obviously the receive worker cannot cancel
itself and vice versa for swork. For the othercon the receive worker
should only be used, however to avoid deadlocks we should pass the same
flags as the original close_connection() was called.

Signed-off-by: Alexander Aring <aahringo@redhat.com>
Signed-off-by: David Teigland <teigland@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
fs/dlm/lowcomms.c

index 3951d39b9b75991d8033404fa4e319da4c080941..d9202ba665cef4b6b34e14991f221580d081dbce 100644 (file)
@@ -607,7 +607,7 @@ static void close_connection(struct connection *con, bool and_other,
        }
        if (con->othercon && and_other) {
                /* Will only re-enter once. */
-               close_connection(con->othercon, false, true, true);
+               close_connection(con->othercon, false, tx, rx);
        }
        if (con->rx_page) {
                __free_page(con->rx_page);