From patchwork Thu Dec 12 04:15:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allison Henderson X-Patchwork-Id: 11287017 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 404E7112B for ; Thu, 12 Dec 2019 04:15:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1FF762464B for ; Thu, 12 Dec 2019 04:15:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="kcDFbXM8" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727865AbfLLEPe (ORCPT ); Wed, 11 Dec 2019 23:15:34 -0500 Received: from userp2130.oracle.com ([156.151.31.86]:48496 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727852AbfLLEPe (ORCPT ); Wed, 11 Dec 2019 23:15:34 -0500 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id xBC4EKAS144653 for ; Thu, 12 Dec 2019 04:15:32 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : subject : date : message-id : in-reply-to : references; s=corp-2019-08-05; bh=8o0gRbxobd1ggmyLlOllBsw2acZ0IvOk/ykp1DQaKco=; b=kcDFbXM8luAufB2QjJM7oCuWKwXg/+6O5K9+r76Y9LY/UHMfMV6sFVkCvCX6bHj6MTvz 6yeNoyejsH68ouFk/GxCICS9FWClO6vbznWE9LXCWisIMXEYoYOlKW02Dod/WGZYcHUK j03j93zcoSg6Z6/kK7VWIEgC1KVankBIZ7hsqQvyy2tpV1VbVxmw2iGhSMbm7JJ1QbLx zMDqfyHebqroFSTm9g2RNOZAd3Z3GkQERKeXljlBshbO/wcE5ESuDC/8Im9VEy+P/gom aHThNq0agfQa0BfcCZAgUFXoSjOXOKWSCWCnxkJt1aPkzM8UP+ywF4bk2ML+6mx8IfMF pQ== Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by userp2130.oracle.com with ESMTP id 2wrw4ndbeb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 12 Dec 2019 04:15:32 +0000 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.27/8.16.0.27) with SMTP id xBC4EGJX089158 for ; Thu, 12 Dec 2019 04:15:32 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserp3020.oracle.com with ESMTP id 2wubmd0rdr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 12 Dec 2019 04:15:31 +0000 Received: from abhmp0016.oracle.com (abhmp0016.oracle.com [141.146.116.22]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id xBC4FTZW003628 for ; Thu, 12 Dec 2019 04:15:29 GMT Received: from localhost.localdomain (/67.1.205.161) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 11 Dec 2019 20:15:28 -0800 From: Allison Collins To: linux-xfs@vger.kernel.org Subject: [PATCH v5 09/14] xfs: Factor up trans roll from xfs_attr3_leaf_setflag Date: Wed, 11 Dec 2019 21:15:08 -0700 Message-Id: <20191212041513.13855-10-allison.henderson@oracle.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191212041513.13855-1-allison.henderson@oracle.com> References: <20191212041513.13855-1-allison.henderson@oracle.com> X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9468 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=938 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1911140001 definitions=main-1912120022 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9468 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1911140001 definitions=main-1912120022 Sender: linux-xfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org 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 9c78e0d..879ff3e 100644 --- a/fs/xfs/libxfs/xfs_attr.c +++ b/fs/xfs/libxfs/xfs_attr.c @@ -1206,6 +1206,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 4fffa84..343fb5e 100644 --- a/fs/xfs/libxfs/xfs_attr_leaf.c +++ b/fs/xfs/libxfs/xfs_attr_leaf.c @@ -2854,10 +2854,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; } /*