From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B843E1B7EA for ; Wed, 9 Aug 2023 07:40:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BF0DEC433CA; Wed, 9 Aug 2023 07:40:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691566842; bh=HOTjbEFChdLj05S67I4O/yFTYMaI/dI1GFp47encdz8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=XjhQHfmsWsRH7cp9xs0NJOMREotTp4ZX639WbH4eOCbhUIB97I893rQMjT5I0tTkd 9JBb0xSdbmeb+ZiUc+Son3W98MrJcZoeITbov6NE5pjVpd/vzoecJ3hunW7xMIaN3D OhVA3OPnLvhicRjQF/SYBGt0yjBKD8BNaS4Zc3N/qhuXecrpy7HzTQ4uN1WinxzyCa fH0NDkozMsf6mKlHWQEFWlJ4OTZfQ545pJmm/pS49rKpzr7SSD74+Jx5iQzdSprQIU MyenJa2EcG23FhvX9zMbNeSLAjmxt3p89AwT/S3lI91a3Nc7r3rG7w+dNNjIRMqqvG DQ3NbfF9BILmg== Date: Wed, 9 Aug 2023 09:40:37 +0200 From: Christian Brauner To: Christoph Hellwig Cc: Al Viro , Namjae Jeon , Sungjong Seo , Theodore Ts'o , Andreas Dilger , Konstantin Komarov , "Darrick J. Wong" , linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, ntfs3@lists.linux.dev, linux-xfs@vger.kernel.org Subject: Re: [PATCH 04/13] xfs: remove xfs_blkdev_put Message-ID: <20230809-duell-fetzen-4a24f2c2b8da@brauner> References: <20230808161600.1099516-1-hch@lst.de> <20230808161600.1099516-5-hch@lst.de> Precedence: bulk X-Mailing-List: ntfs3@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20230808161600.1099516-5-hch@lst.de> On Tue, Aug 08, 2023 at 09:15:51AM -0700, Christoph Hellwig wrote: > There isn't much use for this trivial wrapper, especially as the NULL > check is only needed in a single call site. > > Signed-off-by: Christoph Hellwig > --- > fs/xfs/xfs_super.c | 18 +++++------------- > 1 file changed, 5 insertions(+), 13 deletions(-) > > diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c > index d2f3ae6ba8938b..f00d1162815d19 100644 > --- a/fs/xfs/xfs_super.c > +++ b/fs/xfs/xfs_super.c > @@ -395,15 +395,6 @@ xfs_blkdev_get( > return error; > } > > -STATIC void > -xfs_blkdev_put( > - struct xfs_mount *mp, > - struct block_device *bdev) > -{ > - if (bdev) > - blkdev_put(bdev, mp->m_super); > -} > - > STATIC void > xfs_close_devices( > struct xfs_mount *mp) > @@ -412,13 +403,13 @@ xfs_close_devices( > struct block_device *logdev = mp->m_logdev_targp->bt_bdev; > > xfs_free_buftarg(mp->m_logdev_targp); > - xfs_blkdev_put(mp, logdev); > + blkdev_put(logdev, mp->m_super); > } > if (mp->m_rtdev_targp) { > struct block_device *rtdev = mp->m_rtdev_targp->bt_bdev; > > xfs_free_buftarg(mp->m_rtdev_targp); > - xfs_blkdev_put(mp, rtdev); > + blkdev_put(rtdev, mp->m_super); > } > xfs_free_buftarg(mp->m_ddev_targp); > } > @@ -503,10 +494,11 @@ xfs_open_devices( > out_free_ddev_targ: > xfs_free_buftarg(mp->m_ddev_targp); > out_close_rtdev: > - xfs_blkdev_put(mp, rtdev); > + if (rtdev) nit: I think there's a stray space here. Otherwise, Reviewed-by: Christian Brauner