From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8313FC072A2 for ; Wed, 15 Nov 2023 19:30:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233951AbjKOTaR (ORCPT ); Wed, 15 Nov 2023 14:30:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51226 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233943AbjKOTaQ (ORCPT ); Wed, 15 Nov 2023 14:30:16 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8927B9E for ; Wed, 15 Nov 2023 11:30:13 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 03944C433C7; Wed, 15 Nov 2023 19:30:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1700076613; bh=rF6UTlGjm+O1Z+vUc+toNQHkwEijJX2pb9ucQsrtZjs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PKgrn5n5EoFaWfN3KJBZ/pKTaLjXywdvSwBGgS/hc+CFKUDhEiPzgaits0v7jc2fj fcMUU87RycFCLFzjcIykvXPWHDanR/kK876uC75zXu7jux/NwmLJd72r8kqsTvoIeJ TjgLuBQsSrYuZavrSziGFpzgwj8flQ5rrg+0Sskk= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Alexander Aring , David Teigland , Sasha Levin Subject: [PATCH 6.5 339/550] dlm: fix no ack after final message Date: Wed, 15 Nov 2023 14:15:23 -0500 Message-ID: <20231115191624.260094601@linuxfoundation.org> X-Mailer: git-send-email 2.42.1 In-Reply-To: <20231115191600.708733204@linuxfoundation.org> References: <20231115191600.708733204@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org 6.5-stable review patch. If anyone has any objections, please let me know. ------------------ From: Alexander Aring [ Upstream commit 6212e4528b248a4bc9b4fe68e029a84689c67461 ] In case of an final DLM message we can't should not send an ack out after the final message. This patch moves the ack message before the messages will be transmitted. If it's the final message and the receiving node turns into DLM_CLOSED state another ack messages will being received and turning the receiving node into DLM_ESTABLISHED again. Fixes: 1696c75f1864 ("fs: dlm: add send ack threshold and append acks to msgs") Signed-off-by: Alexander Aring Signed-off-by: David Teigland Signed-off-by: Sasha Levin --- fs/dlm/midcomms.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/dlm/midcomms.c b/fs/dlm/midcomms.c index e1a0df67b5669..12b221c9d74d0 100644 --- a/fs/dlm/midcomms.c +++ b/fs/dlm/midcomms.c @@ -1119,15 +1119,15 @@ struct dlm_mhandle *dlm_midcomms_get_mhandle(int nodeid, int len, break; case DLM_VERSION_3_2: + /* send ack back if necessary */ + dlm_send_ack_threshold(node, DLM_SEND_ACK_BACK_MSG_THRESHOLD); + msg = dlm_midcomms_get_msg_3_2(mh, nodeid, len, allocation, ppc); if (!msg) { dlm_free_mhandle(mh); goto err; } - - /* send ack back if necessary */ - dlm_send_ack_threshold(node, DLM_SEND_ACK_BACK_MSG_THRESHOLD); break; default: dlm_free_mhandle(mh); -- 2.42.0