From patchwork Mon Oct 26 23:32:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 11859053 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 3CFF6921 for ; Mon, 26 Oct 2020 23:35:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2204120872 for ; Mon, 26 Oct 2020 23:35:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="lr6p33Zl" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2406872AbgJZXe7 (ORCPT ); Mon, 26 Oct 2020 19:34:59 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:55022 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2406857AbgJZXe7 (ORCPT ); Mon, 26 Oct 2020 19:34:59 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 09QNOktS164687; Mon, 26 Oct 2020 23:34:53 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-2020-01-29; bh=AWqCASMRB8RlF4Xp1aKLMV8dWaujjIDm2ONRiaBrTfQ=; b=lr6p33ZlLOIQLn2wPO4NBhD0xbGLayvnoucPzAoAWNwjdW8S8JFEQsmqSJuMKiYjoMUB or7P0q7mtfYBQX4ZQlJUhg3+RoN91kQRusteU+N0NntTbjdOXZkGcMxs1FL7KfhhNhsu zIIDVbI0XlW05+Ic+58EL5vXBhctwaTAcjeZn8D44zuL3Opg/h6PByYdei7JoAxPXgUw APmXzmnxdNHBroJSJHaOZaPqBcW8qNo4HV0HahG60uZ+p9gMTlrpofq0AnIct+cYL+jk 0c/2BguzgDW1bdFB3lZviqsa1bWjpfyaTvBKRTuRopp8IzWL61N1nA7bG0dKcTVOXjnh kQ== Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by userp2120.oracle.com with ESMTP id 34dgm3vur5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 26 Oct 2020 23:34:53 +0000 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 09QNPxI0110453; Mon, 26 Oct 2020 23:32:52 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserp3020.oracle.com with ESMTP id 34cx5wfr15-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 26 Oct 2020 23:32:52 +0000 Received: from abhmp0015.oracle.com (abhmp0015.oracle.com [141.146.116.21]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 09QNWp0X028248; Mon, 26 Oct 2020 23:32:51 GMT Received: from localhost (/10.159.145.170) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 26 Oct 2020 16:32:51 -0700 Subject: [PATCH 1/3] xfs: remove kmem_realloc() From: "Darrick J. Wong" To: sandeen@sandeen.net, darrick.wong@oracle.com Cc: Carlos Maiolino , Christoph Hellwig , linux-xfs@vger.kernel.org Date: Mon, 26 Oct 2020 16:32:50 -0700 Message-ID: <160375517015.880210.4790708429158106054.stgit@magnolia> In-Reply-To: <160375516392.880210.12781119775998925242.stgit@magnolia> References: <160375516392.880210.12781119775998925242.stgit@magnolia> User-Agent: StGit/0.19 MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9786 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 mlxscore=0 mlxlogscore=999 suspectscore=2 bulkscore=0 malwarescore=0 spamscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2010260153 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9786 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 lowpriorityscore=0 impostorscore=0 adultscore=0 bulkscore=0 spamscore=0 phishscore=0 mlxlogscore=999 suspectscore=2 clxscore=1015 mlxscore=0 malwarescore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2010260153 Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org From: Carlos Maiolino Source kernel commit: 771915c4f68889b8c41092a928c604c9cd279927 Remove kmem_realloc() function and convert its users to use MM API directly (krealloc()) Signed-off-by: Carlos Maiolino Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Signed-off-by: Darrick J. Wong --- include/kmem.h | 2 +- libxfs/kmem.c | 2 +- libxfs/xfs_iext_tree.c | 2 +- libxfs/xfs_inode_fork.c | 8 ++++---- libxlog/xfs_log_recover.c | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/include/kmem.h b/include/kmem.h index 75fb00579904..c8e25953fd9f 100644 --- a/include/kmem.h +++ b/include/kmem.h @@ -46,6 +46,6 @@ kmem_free(void *ptr) { free(ptr); } -extern void *kmem_realloc(void *, size_t, int); +extern void *krealloc(void *, size_t, int); #endif diff --git a/libxfs/kmem.c b/libxfs/kmem.c index a7a3f2d07102..ee50ab667e56 100644 --- a/libxfs/kmem.c +++ b/libxfs/kmem.c @@ -91,7 +91,7 @@ kmem_zalloc(size_t size, int flags) } void * -kmem_realloc(void *ptr, size_t new_size, int flags) +krealloc(void *ptr, size_t new_size, int flags) { ptr = realloc(ptr, new_size); if (ptr == NULL) { diff --git a/libxfs/xfs_iext_tree.c b/libxfs/xfs_iext_tree.c index f68091dc65a0..a52eed0426a2 100644 --- a/libxfs/xfs_iext_tree.c +++ b/libxfs/xfs_iext_tree.c @@ -603,7 +603,7 @@ xfs_iext_realloc_root( if (new_size / sizeof(struct xfs_iext_rec) == RECS_PER_LEAF) new_size = NODE_SIZE; - new = kmem_realloc(ifp->if_u1.if_root, new_size, KM_NOFS); + new = krealloc(ifp->if_u1.if_root, new_size, GFP_NOFS | __GFP_NOFAIL); memset(new + ifp->if_bytes, 0, new_size - ifp->if_bytes); ifp->if_u1.if_root = new; cur->leaf = new; diff --git a/libxfs/xfs_inode_fork.c b/libxfs/xfs_inode_fork.c index 30522d695e3b..0b1af5012e41 100644 --- a/libxfs/xfs_inode_fork.c +++ b/libxfs/xfs_inode_fork.c @@ -384,8 +384,8 @@ xfs_iroot_realloc( cur_max = xfs_bmbt_maxrecs(mp, ifp->if_broot_bytes, 0); new_max = cur_max + rec_diff; new_size = XFS_BMAP_BROOT_SPACE_CALC(mp, new_max); - ifp->if_broot = kmem_realloc(ifp->if_broot, new_size, - KM_NOFS); + ifp->if_broot = krealloc(ifp->if_broot, new_size, + GFP_NOFS | __GFP_NOFAIL); op = (char *)XFS_BMAP_BROOT_PTR_ADDR(mp, ifp->if_broot, 1, ifp->if_broot_bytes); np = (char *)XFS_BMAP_BROOT_PTR_ADDR(mp, ifp->if_broot, 1, @@ -494,8 +494,8 @@ xfs_idata_realloc( * in size so that it can be logged and stay on word boundaries. * We enforce that here. */ - ifp->if_u1.if_data = kmem_realloc(ifp->if_u1.if_data, - roundup(new_size, 4), KM_NOFS); + ifp->if_u1.if_data = krealloc(ifp->if_u1.if_data, roundup(new_size, 4), + GFP_NOFS | __GFP_NOFAIL); ifp->if_bytes = new_size; } diff --git a/libxlog/xfs_log_recover.c b/libxlog/xfs_log_recover.c index ec6533991f0f..a7dfa7047ab9 100644 --- a/libxlog/xfs_log_recover.c +++ b/libxlog/xfs_log_recover.c @@ -1045,7 +1045,7 @@ xlog_recover_add_to_cont_trans( old_ptr = item->ri_buf[item->ri_cnt-1].i_addr; old_len = item->ri_buf[item->ri_cnt-1].i_len; - ptr = kmem_realloc(old_ptr, len+old_len, 0); + ptr = krealloc(old_ptr, len+old_len, 0); memcpy(&ptr[old_len], dp, len); /* d, s, l */ item->ri_buf[item->ri_cnt-1].i_len += len; item->ri_buf[item->ri_cnt-1].i_addr = ptr; From patchwork Mon Oct 26 23:32:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 11859021 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 CD045921 for ; Mon, 26 Oct 2020 23:33:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B264020872 for ; Mon, 26 Oct 2020 23:33:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="Dh619RIk" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2406466AbgJZXdD (ORCPT ); Mon, 26 Oct 2020 19:33:03 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:53792 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2406465AbgJZXdD (ORCPT ); Mon, 26 Oct 2020 19:33:03 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 09QNOXm8164641; Mon, 26 Oct 2020 23:32:58 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-2020-01-29; bh=gQD5phMuq0azj/jiPF1+wtOnafFV/h7gNFyHHXxFeaE=; b=Dh619RIkq2UKNm02qsSJ9W19su26GdJnleCGSmEI0UIjYFyEjsoXM3i/NfeGCmgh+Ln0 vi1scK1+JnofU/hdGaSPcyzxFiwOcyytK1KXllGqKSB0hVuI6UZ5r9p5nTCbd4cjMst4 R33wUGd/DK1y/H6lrqzeNG/Rwp9XwuhAR0akE1rOPJxQWcRpan1kRW+6T2QYF4jyZ/kB t/+zktW+s6JImEbgLOhnyubuMocfiLuUkvE5doQUNXxeRp+D++4IYGeylH4t8tLmL0sG 7Sl4u08nM6d6pynn2m5es4hdgHxHKCT8dn/e6TP9o7bf0wB9d1+ztXNypjmGazlvLCUb zQ== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by userp2120.oracle.com with ESMTP id 34dgm3vum6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 26 Oct 2020 23:32:58 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 09QNPGZq120985; Mon, 26 Oct 2020 23:32:58 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userp3030.oracle.com with ESMTP id 34cx6va4te-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 26 Oct 2020 23:32:58 +0000 Received: from abhmp0003.oracle.com (abhmp0003.oracle.com [141.146.116.9]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 09QNWvPv028294; Mon, 26 Oct 2020 23:32:57 GMT Received: from localhost (/10.159.145.170) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 26 Oct 2020 16:32:57 -0700 Subject: [PATCH 2/3] xfs: move the buffer retry logic to xfs_buf.c From: "Darrick J. Wong" To: sandeen@sandeen.net, darrick.wong@oracle.com Cc: Christoph Hellwig , linux-xfs@vger.kernel.org Date: Mon, 26 Oct 2020 16:32:56 -0700 Message-ID: <160375517648.880210.5292913443729268324.stgit@magnolia> In-Reply-To: <160375516392.880210.12781119775998925242.stgit@magnolia> References: <160375516392.880210.12781119775998925242.stgit@magnolia> User-Agent: StGit/0.19 MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9786 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 phishscore=0 spamscore=0 bulkscore=0 malwarescore=0 mlxlogscore=999 mlxscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2010260153 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9786 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 lowpriorityscore=0 impostorscore=0 adultscore=0 bulkscore=0 spamscore=0 phishscore=0 mlxlogscore=999 suspectscore=0 clxscore=1015 mlxscore=0 malwarescore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2010260153 Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org From: Christoph Hellwig Source kernel commit: 664ffb8a429a800c51964b94c15c6a92c8d8334c Move the buffer retry state machine logic to xfs_buf.c and call it once from xfs_ioend instead of duplicating it three times for the three kinds of buffers. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Signed-off-by: Darrick J. Wong --- libxfs/xfs_trans_inode.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libxfs/xfs_trans_inode.c b/libxfs/xfs_trans_inode.c index 82716ea27f92..a392fd293d25 100644 --- a/libxfs/xfs_trans_inode.c +++ b/libxfs/xfs_trans_inode.c @@ -174,9 +174,9 @@ xfs_trans_log_inode( /* * Always OR in the bits from the ili_last_fields field. This is to - * coordinate with the xfs_iflush() and xfs_iflush_done() routines in - * the eventual clearing of the ili_fields bits. See the big comment in - * xfs_iflush() for an explanation of this coordination mechanism. + * coordinate with the xfs_iflush() and xfs_buf_inode_iodone() routines + * in the eventual clearing of the ili_fields bits. See the big comment + * in xfs_iflush() for an explanation of this coordination mechanism. */ iip->ili_fields |= (flags | iip->ili_last_fields | iversion_flags); spin_unlock(&iip->ili_lock); From patchwork Mon Oct 26 23:33:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 11859057 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 96FFA1130 for ; Mon, 26 Oct 2020 23:35:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 79C3620809 for ; Mon, 26 Oct 2020 23:35:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="o4bvQfpP" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2406882AbgJZXfO (ORCPT ); Mon, 26 Oct 2020 19:35:14 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:37078 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2406870AbgJZXfN (ORCPT ); Mon, 26 Oct 2020 19:35:13 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 09QNP0Fa157923; Mon, 26 Oct 2020 23:35:09 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-2020-01-29; bh=/9/bOy4QxrzHvk18qhjkwoTNIYN97lfiTMPbc0EAzjw=; b=o4bvQfpPzyDHoYECKQ1FpT+vMruP/tIcQ7cf8QWWZ5deIuwn87NDGeZ4Ir5y9xVSnrsk uNfHlYilNcfvg9fGRlN/o1NCAob8y5Ssgq0KtoikdEDoferANiow/H/0JttkCuM7TnrX aQf9IXkGef6rft2OwA2bIa6mShKVYkOnm6RKHe+tgKl/h+/S6KEdYG44tjk7wfDf6Wd4 IbgsZeAfpkwt7Jf6kZ8SgdlFVNa95GovMX10XCLfDZfkahQcQAR8T+EzaAqSBiesGQuu rOSZekEA9VHHxq4Ny68WbkdjNbRoKlI1jhBRCXrLd/FYUYRmcGfo3DF1p1mDviTbVNqd kQ== Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by aserp2120.oracle.com with ESMTP id 34cc7kq8ky-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 26 Oct 2020 23:35:09 +0000 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 09QNPx6M110501; Mon, 26 Oct 2020 23:33:09 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserp3020.oracle.com with ESMTP id 34cx5wfr8p-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 26 Oct 2020 23:33:09 +0000 Received: from abhmp0009.oracle.com (abhmp0009.oracle.com [141.146.116.15]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 09QNX8Oi012110; Mon, 26 Oct 2020 23:33:08 GMT Received: from localhost (/10.159.145.170) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 26 Oct 2020 16:33:03 -0700 Subject: [PATCH 3/3] xfs: simplify xfs_trans_getsb From: "Darrick J. Wong" To: sandeen@sandeen.net, darrick.wong@oracle.com Cc: Christoph Hellwig , linux-xfs@vger.kernel.org Date: Mon, 26 Oct 2020 16:33:02 -0700 Message-ID: <160375518271.880210.13520449755739439500.stgit@magnolia> In-Reply-To: <160375516392.880210.12781119775998925242.stgit@magnolia> References: <160375516392.880210.12781119775998925242.stgit@magnolia> User-Agent: StGit/0.19 MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9786 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 mlxscore=0 mlxlogscore=999 suspectscore=0 bulkscore=0 malwarescore=0 spamscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2010260153 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9786 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 lowpriorityscore=0 adultscore=0 malwarescore=0 spamscore=0 clxscore=1015 mlxscore=0 suspectscore=0 priorityscore=1501 impostorscore=0 bulkscore=0 phishscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2010260153 Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org From: Christoph Hellwig Source kernel commit: cead0b10f557a2331e0e131ce52aaf7ed7f5355f Remove the mp argument as this function is only called in transaction context, and open code xfs_getsb given that the function already accesses the buffer pointer in the mount point directly. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Signed-off-by: Darrick J. Wong --- include/xfs_trans.h | 2 +- libxfs/trans.c | 6 +++--- libxfs/xfs_sb.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/xfs_trans.h b/include/xfs_trans.h index 1f087672a2a8..9292a4a54237 100644 --- a/include/xfs_trans.h +++ b/include/xfs_trans.h @@ -91,7 +91,7 @@ void libxfs_trans_cancel(struct xfs_trans *); /* cancel dfops associated with a transaction */ void xfs_defer_cancel(struct xfs_trans *); -struct xfs_buf *libxfs_trans_getsb(struct xfs_trans *, struct xfs_mount *); +struct xfs_buf *libxfs_trans_getsb(struct xfs_trans *); void libxfs_trans_ijoin(struct xfs_trans *, struct xfs_inode *, uint); void libxfs_trans_log_inode (struct xfs_trans *, struct xfs_inode *, diff --git a/libxfs/trans.c b/libxfs/trans.c index 51ce83021e87..6838b727350b 100644 --- a/libxfs/trans.c +++ b/libxfs/trans.c @@ -463,10 +463,10 @@ libxfs_trans_get_buf_map( xfs_buf_t * libxfs_trans_getsb( - xfs_trans_t *tp, - struct xfs_mount *mp) + struct xfs_trans *tp) { - xfs_buf_t *bp; + struct xfs_mount *mp = tp->t_mountp; + struct xfs_buf *bp; struct xfs_buf_log_item *bip; int len = XFS_FSS_TO_BB(mp, 1); DEFINE_SINGLE_BUF_MAP(map, XFS_SB_DADDR, len); diff --git a/libxfs/xfs_sb.c b/libxfs/xfs_sb.c index 302eea167f4e..7c7e56a8979c 100644 --- a/libxfs/xfs_sb.c +++ b/libxfs/xfs_sb.c @@ -931,7 +931,7 @@ xfs_log_sb( struct xfs_trans *tp) { struct xfs_mount *mp = tp->t_mountp; - struct xfs_buf *bp = xfs_trans_getsb(tp, mp); + struct xfs_buf *bp = xfs_trans_getsb(tp); mp->m_sb.sb_icount = percpu_counter_sum(&mp->m_icount); mp->m_sb.sb_ifree = percpu_counter_sum(&mp->m_ifree); @@ -1061,7 +1061,7 @@ xfs_sync_sb_buf( if (error) return error; - bp = xfs_trans_getsb(tp, mp); + bp = xfs_trans_getsb(tp); xfs_log_sb(tp); xfs_trans_bhold(tp, bp); xfs_trans_set_sync(tp);