xfs: refactor scrub transaction allocation function

Since the transaction allocation helper is about to become more complex,
move it to common.c and remove the redundant parameters.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
This commit is contained in:
Darrick J. Wong
2018-05-09 10:02:01 -07:00
parent 08a3a692ef
commit 9d9c90286a
4 changed files with 17 additions and 21 deletions

View File

@@ -38,19 +38,7 @@ xfs_scrub_should_terminate(
return false;
}
/*
* Grab an empty transaction so that we can re-grab locked buffers if
* one of our btrees turns out to be cyclic.
*/
static inline int
xfs_scrub_trans_alloc(
struct xfs_scrub_metadata *sm,
struct xfs_mount *mp,
struct xfs_trans **tpp)
{
return xfs_trans_alloc_empty(mp, tpp);
}
int xfs_scrub_trans_alloc(struct xfs_scrub_context *sc);
bool xfs_scrub_process_error(struct xfs_scrub_context *sc, xfs_agnumber_t agno,
xfs_agblock_t bno, int *error);
bool xfs_scrub_fblock_process_error(struct xfs_scrub_context *sc, int whichfork,