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=-8.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 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 93CC1C49ED7 for ; Fri, 20 Sep 2019 13:50:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6403E2054F for ; Fri, 20 Sep 2019 13:50:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728593AbfITNut (ORCPT ); Fri, 20 Sep 2019 09:50:49 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44302 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727836AbfITNut (ORCPT ); Fri, 20 Sep 2019 09:50:49 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BA7FF3082A6C; Fri, 20 Sep 2019 13:50:48 +0000 (UTC) Received: from bfoster (dhcp-41-2.bos.redhat.com [10.18.41.2]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 62C2D60F80; Fri, 20 Sep 2019 13:50:48 +0000 (UTC) Date: Fri, 20 Sep 2019 09:50:46 -0400 From: Brian Foster To: Allison Collins Cc: linux-xfs@vger.kernel.org Subject: Re: [PATCH v3 09/19] xfs: Factor up trans roll from xfs_attr3_leaf_setflag Message-ID: <20190920135046.GG40150@bfoster> References: <20190905221837.17388-1-allison.henderson@oracle.com> <20190905221837.17388-10-allison.henderson@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190905221837.17388-10-allison.henderson@oracle.com> User-Agent: Mutt/1.12.1 (2019-06-15) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.45]); Fri, 20 Sep 2019 13:50:48 +0000 (UTC) Sender: linux-xfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org On Thu, Sep 05, 2019 at 03:18:27PM -0700, Allison Collins wrote: > New delayed allocation routines cannot be handling > transactions so factor them up into the calling functions > > Signed-off-by: Allison Collins > Reviewed-by: Darrick J. Wong > --- Reviewed-by: Brian Foster > fs/xfs/libxfs/xfs_attr.c | 5 +++++ > fs/xfs/libxfs/xfs_attr_leaf.c | 5 +---- > 2 files changed, 6 insertions(+), 4 deletions(-) > > diff --git a/fs/xfs/libxfs/xfs_attr.c b/fs/xfs/libxfs/xfs_attr.c > index 318c543..5e5b688 100644 > --- a/fs/xfs/libxfs/xfs_attr.c > +++ b/fs/xfs/libxfs/xfs_attr.c > @@ -1199,6 +1199,11 @@ xfs_attr_node_removename( > error = xfs_attr3_leaf_setflag(args); > if (error) > goto out; > + > + error = xfs_trans_roll_inode(&args->trans, args->dp); > + if (error) > + goto out; > + > error = xfs_attr_rmtval_remove(args); > if (error) > goto out; > diff --git a/fs/xfs/libxfs/xfs_attr_leaf.c b/fs/xfs/libxfs/xfs_attr_leaf.c > index 3903e5c..bcd86c3 100644 > --- a/fs/xfs/libxfs/xfs_attr_leaf.c > +++ b/fs/xfs/libxfs/xfs_attr_leaf.c > @@ -2801,10 +2801,7 @@ xfs_attr3_leaf_setflag( > XFS_DA_LOGRANGE(leaf, name_rmt, sizeof(*name_rmt))); > } > > - /* > - * Commit the flag value change and start the next trans in series. > - */ > - return xfs_trans_roll_inode(&args->trans, args->dp); > + return error; > } > > /* > -- > 2.7.4 >