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 X-Spam-Level: X-Spam-Status: No, score=-16.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EB820C433EF for ; Wed, 15 Sep 2021 23:07:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C7886606A5 for ; Wed, 15 Sep 2021 23:07:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232774AbhIOXIo (ORCPT ); Wed, 15 Sep 2021 19:08:44 -0400 Received: from mail.kernel.org ([198.145.29.99]:60258 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232733AbhIOXIn (ORCPT ); Wed, 15 Sep 2021 19:08:43 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 246C5600D4; Wed, 15 Sep 2021 23:07:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1631747244; bh=k+ceTG6tb99Q6RQzkUNTrHLBvc8/pZ25x1b2ihAGRqY=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=Dq8emHbcyT6p0j65vjvZpEkrp+CL4/cScerMeUk+fmXNfhoyJ5I1Ngyve5coS6i6N g94bYzAstCKUxFtjDBmFFFMDNNK2J1maOx61Z1EUrqY6YPBc5Zsg3NgjYohX6Opm0C c3OprChh1Ti6MNtLpXf1N9/SNI5b7pmNEueb4WgYmG2os7IMKLTaNbZXB625Mdmgyf iLuosr9pplBSU5QtxObI8LUPnfNPgc80Up/qnMRLFd58UNgTCmQdgApq7BOaFOiCaQ TGlJ9nOSjM94ZwbU98+UaVwNcI38CLAVWtBvbuTQlEuhpDGIcQl94H0Jv9vYWDV6hX cfThEFzHbHsKQ== Subject: [PATCH 09/61] xfs: Reverse apply 72b97ea40d From: "Darrick J. Wong" To: sandeen@sandeen.net, djwong@kernel.org Cc: Allison Henderson , Brian Foster , Chandan Babu R , linux-xfs@vger.kernel.org Date: Wed, 15 Sep 2021 16:07:23 -0700 Message-ID: <163174724389.350433.12831878661075030151.stgit@magnolia> In-Reply-To: <163174719429.350433.8562606396437219220.stgit@magnolia> References: <163174719429.350433.8562606396437219220.stgit@magnolia> User-Agent: StGit/0.19 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org From: Allison Henderson Source kernel commit: 4126c06e25b38842a254b2de6ffc3019a7b2f0ca Originally we added this patch to help modularize the attr code in preparation for delayed attributes and the state machine it requires. However, later reviews found that this slightly alters the transaction handling as the helper function is ambiguous as to whether the transaction is diry or clean. This may cause a dirty transaction to be included in the next roll, where previously it had not. To preserve the existing code flow, we reverse apply this commit. Signed-off-by: Allison Henderson Reviewed-by: Brian Foster Reviewed-by: Chandan Babu R Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong --- libxfs/xfs_attr.c | 28 +++++++++------------------- 1 file changed, 9 insertions(+), 19 deletions(-) diff --git a/libxfs/xfs_attr.c b/libxfs/xfs_attr.c index dce7ded5..1c60bddd 100644 --- a/libxfs/xfs_attr.c +++ b/libxfs/xfs_attr.c @@ -1214,24 +1214,6 @@ int xfs_attr_node_removename_setup( return 0; } -STATIC int -xfs_attr_node_remove_rmt( - struct xfs_da_args *args, - struct xfs_da_state *state) -{ - int error = 0; - - error = xfs_attr_rmtval_remove(args); - if (error) - return error; - - /* - * Refill the state structure with buffers, the prior calls released our - * buffers. - */ - return xfs_attr_refillstate(state); -} - /* * Remove a name from a B-tree attribute list. * @@ -1260,7 +1242,15 @@ xfs_attr_node_removename( * overflow the maximum size of a transaction and/or hit a deadlock. */ if (args->rmtblkno > 0) { - error = xfs_attr_node_remove_rmt(args, state); + error = xfs_attr_rmtval_remove(args); + if (error) + goto out; + + /* + * Refill the state structure with buffers, the prior calls + * released our buffers. + */ + error = xfs_attr_refillstate(state); if (error) goto out; }