Commit d3ef7e94 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Christian Brauner

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: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarChristian Brauner <brauner@kernel.org>
Reviewed-by: default avatar"Darrick J. Wong" <djwong@kernel.org>
Message-Id: <20230809220545.1308228-5-hch@lst.de>
Signed-off-by: default avatarChristian Brauner <brauner@kernel.org>
parent 2a9311ad
...@@ -406,15 +406,6 @@ xfs_blkdev_get( ...@@ -406,15 +406,6 @@ xfs_blkdev_get(
return error; return error;
} }
STATIC void
xfs_blkdev_put(
struct xfs_mount *mp,
struct block_device *bdev)
{
if (bdev)
blkdev_put(bdev, mp);
}
STATIC void STATIC void
xfs_close_devices( xfs_close_devices(
struct xfs_mount *mp) struct xfs_mount *mp)
...@@ -423,13 +414,13 @@ xfs_close_devices( ...@@ -423,13 +414,13 @@ xfs_close_devices(
struct block_device *logdev = mp->m_logdev_targp->bt_bdev; struct block_device *logdev = mp->m_logdev_targp->bt_bdev;
xfs_free_buftarg(mp->m_logdev_targp); xfs_free_buftarg(mp->m_logdev_targp);
xfs_blkdev_put(mp, logdev); blkdev_put(logdev, mp);
} }
if (mp->m_rtdev_targp) { if (mp->m_rtdev_targp) {
struct block_device *rtdev = mp->m_rtdev_targp->bt_bdev; struct block_device *rtdev = mp->m_rtdev_targp->bt_bdev;
xfs_free_buftarg(mp->m_rtdev_targp); xfs_free_buftarg(mp->m_rtdev_targp);
xfs_blkdev_put(mp, rtdev); blkdev_put(rtdev, mp);
} }
xfs_free_buftarg(mp->m_ddev_targp); xfs_free_buftarg(mp->m_ddev_targp);
} }
...@@ -504,10 +495,11 @@ xfs_open_devices( ...@@ -504,10 +495,11 @@ xfs_open_devices(
out_free_ddev_targ: out_free_ddev_targ:
xfs_free_buftarg(mp->m_ddev_targp); xfs_free_buftarg(mp->m_ddev_targp);
out_close_rtdev: out_close_rtdev:
xfs_blkdev_put(mp, rtdev); if (rtdev)
blkdev_put(rtdev, mp);
out_close_logdev: out_close_logdev:
if (logdev && logdev != ddev) if (logdev && logdev != ddev)
xfs_blkdev_put(mp, logdev); blkdev_put(logdev, mp);
return error; return error;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment