From patchwork Thu Mar 14 21:07:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 10853647 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B72FB17E6 for ; Thu, 14 Mar 2019 21:07:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A062B2A77B for ; Thu, 14 Mar 2019 21:07:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9ECF02A780; Thu, 14 Mar 2019 21:07:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 51FB42A790 for ; Thu, 14 Mar 2019 21:07:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727843AbfCNVHM (ORCPT ); Thu, 14 Mar 2019 17:07:12 -0400 Received: from aserp2130.oracle.com ([141.146.126.79]:53336 "EHLO aserp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727204AbfCNVHM (ORCPT ); Thu, 14 Mar 2019 17:07:12 -0400 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x2EKwpFC132843; Thu, 14 Mar 2019 21:07:10 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : from : to : cc : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=MyLC/QkcsVswqlbcEJZIObOa7tHjyBtEUZXj8Ko8vUg=; b=k1zFk3FuXtL9JXLR/LExcDUdhJ2L6oHHwDVftuJcSy8oa6iqZn/gMPs5T2dhyxhqm5oD Z2UOF4ASvwhTYKFQvu9NAV3ZFlLIRhHPs3w5sSH86mIIxTVf8PZbAlVj3c+U2RcwJ2jT pchnp+j6aKSUARbXqTVGe2v5G7AEScHvVhwU4YSa6noo+KG65i+TcjgAuN6c+RvGjaE8 7NdGuWe+bLL6mANo7hZ6Y+9TwO23QjdrzIzcwllg3uxI3ZXKRWkofpLlJ0SqPv9dvpmb s7mpoOYDw8hNH7Ymsy+741sgqrR/cZaQ8KmBsqMuuxZ/JkPF5dVpcowuetuR/g/+3ShF 0g== Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by aserp2130.oracle.com with ESMTP id 2r430f3xxv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 14 Mar 2019 21:07:10 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id x2EL74uZ011706 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 14 Mar 2019 21:07:04 GMT Received: from abhmp0004.oracle.com (abhmp0004.oracle.com [141.146.116.10]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id x2EL74iA007968; Thu, 14 Mar 2019 21:07:04 GMT Received: from localhost (/10.145.178.102) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 14 Mar 2019 21:07:03 +0000 Subject: [PATCH 31/36] libxfs: refactor the open-coded libxfs_trans_bjoin calls From: "Darrick J. Wong" To: sandeen@sandeen.net, darrick.wong@oracle.com Cc: linux-xfs@vger.kernel.org Date: Thu, 14 Mar 2019 14:07:03 -0700 Message-ID: <155259762358.31886.5732556054840025852.stgit@magnolia> In-Reply-To: <155259742281.31886.17157720770696604377.stgit@magnolia> References: <155259742281.31886.17157720770696604377.stgit@magnolia> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9195 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 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-1810050000 definitions=main-1903140143 Sender: linux-xfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Darrick J. Wong Refactor open-coded bjoin code to use libxfs_trans_bjoin. Signed-off-by: Darrick J. Wong Reviewed-by: Eric Sandeen --- libxfs/trans.c | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/libxfs/trans.c b/libxfs/trans.c index 10a35dd4..7bdd1544 100644 --- a/libxfs/trans.c +++ b/libxfs/trans.c @@ -663,13 +663,9 @@ libxfs_trans_get_buf_map( fprintf(stderr, "trans_get_buf buffer %p, transaction %p\n", bp, tp); #endif - xfs_buf_item_init(bp, tp->t_mountp); + libxfs_trans_bjoin(tp, bp); bip = bp->b_log_item; bip->bli_recur = 0; - xfs_trans_add_item(tp, (xfs_log_item_t *)bip); - - /* initialize b_transp so we can find it incore */ - bp->b_transp = tp; return bp; } @@ -701,13 +697,9 @@ libxfs_trans_getsb( fprintf(stderr, "trans_get_sb buffer %p, transaction %p\n", bp, tp); #endif - xfs_buf_item_init(bp, mp); + libxfs_trans_bjoin(tp, bp); bip = bp->b_log_item; bip->bli_recur = 0; - xfs_trans_add_item(tp, (xfs_log_item_t *)bip); - - /* initialize b_transp so we can find it incore */ - bp->b_transp = tp; return bp; } @@ -758,13 +750,9 @@ libxfs_trans_read_buf_map( fprintf(stderr, "trans_read_buf buffer %p, transaction %p\n", bp, tp); #endif - xfs_buf_item_init(bp, tp->t_mountp); + xfs_trans_bjoin(tp, bp); bip = bp->b_log_item; bip->bli_recur = 0; - xfs_trans_add_item(tp, (xfs_log_item_t *)bip); - - /* initialise b_transp so we can find it incore */ - bp->b_transp = tp; done: *bpp = bp; return 0;