diff options
author | Christoph Hellwig <hch@lst.de> | 2023-08-09 15:05:36 -0700 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2023-08-10 10:34:54 +0200 |
commit | d3ef7e94ee36adc8f0006d253a9ad45793b874cd (patch) | |
tree | 8a3d485fbe6f2a4d2d9623c693545859b47d69ca /fs/xfs | |
parent | 2a9311adb87c98599989b80405fe2c60cd4075dd (diff) | |
download | linux-stable-d3ef7e94ee36adc8f0006d253a9ad45793b874cd.tar.gz linux-stable-d3ef7e94ee36adc8f0006d253a9ad45793b874cd.tar.bz2 linux-stable-d3ef7e94ee36adc8f0006d253a9ad45793b874cd.zip |
xfs: remove xfs_blkdev_put
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 <hch@lst.de>
Reviewed-by: Christian Brauner <brauner@kernel.org>
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
Message-Id: <20230809220545.1308228-5-hch@lst.de>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/xfs')
-rw-r--r-- | fs/xfs/xfs_super.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c index 31260fc09719..332e32d8ca5a 100644 --- a/fs/xfs/xfs_super.c +++ b/fs/xfs/xfs_super.c @@ -407,15 +407,6 @@ xfs_blkdev_get( } STATIC void -xfs_blkdev_put( - struct xfs_mount *mp, - struct block_device *bdev) -{ - if (bdev) - blkdev_put(bdev, mp); -} - -STATIC void xfs_close_devices( struct xfs_mount *mp) { @@ -423,13 +414,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); } 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); } xfs_free_buftarg(mp->m_ddev_targp); } @@ -504,10 +495,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) + blkdev_put(rtdev, mp); out_close_logdev: if (logdev && logdev != ddev) - xfs_blkdev_put(mp, logdev); + blkdev_put(logdev, mp); return error; } |