From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from userp2120.oracle.com ([156.151.31.85]:59372 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726189AbfHIViV (ORCPT ); Fri, 9 Aug 2019 17:38:21 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x79LYbFJ084554 for ; Fri, 9 Aug 2019 21:38:19 GMT Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by userp2120.oracle.com with ESMTP id 2u8hgpa7y5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 09 Aug 2019 21:38:19 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x79LNTr2056356 for ; Fri, 9 Aug 2019 21:38:19 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userp3030.oracle.com with ESMTP id 2u8pj9m4j4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 09 Aug 2019 21:38:19 +0000 Received: from abhmp0017.oracle.com (abhmp0017.oracle.com [141.146.116.23]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id x79LcIMq010601 for ; Fri, 9 Aug 2019 21:38:18 GMT From: Allison Collins Subject: [PATCH v1 07/19] xfsprogs: Factor up trans handling in xfs_attr3_leaf_flipflags Date: Fri, 9 Aug 2019 14:37:52 -0700 Message-Id: <20190809213804.32628-8-allison.henderson@oracle.com> In-Reply-To: <20190809213804.32628-1-allison.henderson@oracle.com> References: <20190809213804.32628-1-allison.henderson@oracle.com> Sender: linux-xfs-owner@vger.kernel.org List-ID: List-Id: xfs To: linux-xfs@vger.kernel.org Since delayed operations cannot roll transactions, factor up the transaction handling into the calling function Signed-off-by: Allison Collins --- libxfs/xfs_attr.c | 10 ++++++++++ libxfs/xfs_attr_leaf.c | 5 ----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/libxfs/xfs_attr.c b/libxfs/xfs_attr.c index f082b30..8b3d6a3 100644 --- a/libxfs/xfs_attr.c +++ b/libxfs/xfs_attr.c @@ -753,6 +753,11 @@ xfs_attr_leaf_addname( error = xfs_attr3_leaf_flipflags(args); if (error) return error; + /* + * Commit the flag value change and start the next trans in + * series. + */ + error = xfs_trans_roll_inode(&args->trans, args->dp); /* * Dismantle the "old" attribute/value pair by removing @@ -1091,6 +1096,11 @@ restart: error = xfs_attr3_leaf_flipflags(args); if (error) goto out; + /* + * Commit the flag value change and start the next trans in + * series + */ + error = xfs_trans_roll_inode(&args->trans, args->dp); /* * Dismantle the "old" attribute/value pair by removing diff --git a/libxfs/xfs_attr_leaf.c b/libxfs/xfs_attr_leaf.c index 2ebe2c6..1ac64dd 100644 --- a/libxfs/xfs_attr_leaf.c +++ b/libxfs/xfs_attr_leaf.c @@ -2890,10 +2890,5 @@ xfs_attr3_leaf_flipflags( XFS_DA_LOGRANGE(leaf2, name_rmt, sizeof(*name_rmt))); } - /* - * Commit the flag value change and start the next trans in series. - */ - error = xfs_trans_roll_inode(&args->trans, args->dp); - return error; } -- 2.7.4