Skip to content

Commit 964176b

Browse files
committed
xfs: rearrange xfs_inode_walk_ag parameters
The perag structure already has a pointer to the xfs_mount, so we don't need to pass that separately and can drop it. Having done that, move iter_flags so that the argument order is the same between xfs_inode_walk and xfs_inode_walk_ag. The latter will make things less confusing for a future patch that enables background scanning work to be done in parallel. Signed-off-by: Darrick J. Wong <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Reviewed-by: Brian Foster <[email protected]>
1 parent 042f65f commit 964176b

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

fs/xfs/xfs_icache.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -817,13 +817,13 @@ xfs_inode_walk_ag_grab(
817817
*/
818818
STATIC int
819819
xfs_inode_walk_ag(
820-
struct xfs_mount *mp,
821820
struct xfs_perag *pag,
821+
int iter_flags,
822822
int (*execute)(struct xfs_inode *ip, void *args),
823823
void *args,
824-
int tag,
825-
int iter_flags)
824+
int tag)
826825
{
826+
struct xfs_mount *mp = pag->pag_mount;
827827
uint32_t first_index;
828828
int last_error = 0;
829829
int skipped;
@@ -952,8 +952,7 @@ xfs_inode_walk(
952952
ag = 0;
953953
while ((pag = xfs_inode_walk_get_perag(mp, ag, tag))) {
954954
ag = pag->pag_agno + 1;
955-
error = xfs_inode_walk_ag(mp, pag, execute, args, tag,
956-
iter_flags);
955+
error = xfs_inode_walk_ag(pag, iter_flags, execute, args, tag);
957956
xfs_perag_put(pag);
958957
if (error) {
959958
last_error = error;

0 commit comments

Comments
 (0)