summaryrefslogtreecommitdiff
path: root/fs/xfs/scrub/common.c
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2021-04-07 17:59:39 -0700
committerDarrick J. Wong <djwong@kernel.org>2021-04-09 10:27:18 -0700
commit026f57ebe1beeae086f48c27cb0664cbb30cd955 (patch)
treec931245c27df8223987d2a3848ec305f9613d8be /fs/xfs/scrub/common.c
parent71bddbccab436a261a22afe5d90de269941d0fe7 (diff)
xfs: get rid of the ip parameter to xchk_setup_*
Now that the scrub context stores a pointer to the file that was used to invoke the scrub call, the struct xfs_inode pointer that we passed to all the setup functions is no longer necessary. This is only ever used if the caller wants us to scrub the metadata of the open file. Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Chandan Babu R <chandanrlinux@gmail.com> Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/scrub/common.c')
-rw-r--r--fs/xfs/scrub/common.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/fs/xfs/scrub/common.c b/fs/xfs/scrub/common.c
index d8da0ea772bc..aa874607618a 100644
--- a/fs/xfs/scrub/common.c
+++ b/fs/xfs/scrub/common.c
@@ -593,8 +593,7 @@ xchk_trans_alloc(
/* Set us up with a transaction and an empty context. */
int
xchk_setup_fs(
- struct xfs_scrub *sc,
- struct xfs_inode *ip)
+ struct xfs_scrub *sc)
{
uint resblks;
@@ -606,7 +605,6 @@ xchk_setup_fs(
int
xchk_setup_ag_btree(
struct xfs_scrub *sc,
- struct xfs_inode *ip,
bool force_log)
{
struct xfs_mount *mp = sc->mp;
@@ -624,7 +622,7 @@ xchk_setup_ag_btree(
return error;
}
- error = xchk_setup_fs(sc, ip);
+ error = xchk_setup_fs(sc);
if (error)
return error;
@@ -652,11 +650,11 @@ xchk_checkpoint_log(
*/
int
xchk_get_inode(
- struct xfs_scrub *sc,
- struct xfs_inode *ip_in)
+ struct xfs_scrub *sc)
{
struct xfs_imap imap;
struct xfs_mount *mp = sc->mp;
+ struct xfs_inode *ip_in = XFS_I(file_inode(sc->file));
struct xfs_inode *ip = NULL;
int error;
@@ -717,12 +715,11 @@ xchk_get_inode(
int
xchk_setup_inode_contents(
struct xfs_scrub *sc,
- struct xfs_inode *ip,
unsigned int resblks)
{
int error;
- error = xchk_get_inode(sc, ip);
+ error = xchk_get_inode(sc);
if (error)
return error;