mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-26 00:21:17 +00:00
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 <darrick.wong@oracle.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Brian Foster <bfoster@redhat.com>
This commit is contained in:
parent
042f65f4a7
commit
964176bd32
1 changed files with 4 additions and 5 deletions
|
@ -817,13 +817,13 @@ out_unlock_noent:
|
||||||
*/
|
*/
|
||||||
STATIC int
|
STATIC int
|
||||||
xfs_inode_walk_ag(
|
xfs_inode_walk_ag(
|
||||||
struct xfs_mount *mp,
|
|
||||||
struct xfs_perag *pag,
|
struct xfs_perag *pag,
|
||||||
|
int iter_flags,
|
||||||
int (*execute)(struct xfs_inode *ip, void *args),
|
int (*execute)(struct xfs_inode *ip, void *args),
|
||||||
void *args,
|
void *args,
|
||||||
int tag,
|
int tag)
|
||||||
int iter_flags)
|
|
||||||
{
|
{
|
||||||
|
struct xfs_mount *mp = pag->pag_mount;
|
||||||
uint32_t first_index;
|
uint32_t first_index;
|
||||||
int last_error = 0;
|
int last_error = 0;
|
||||||
int skipped;
|
int skipped;
|
||||||
|
@ -952,8 +952,7 @@ xfs_inode_walk(
|
||||||
ag = 0;
|
ag = 0;
|
||||||
while ((pag = xfs_inode_walk_get_perag(mp, ag, tag))) {
|
while ((pag = xfs_inode_walk_get_perag(mp, ag, tag))) {
|
||||||
ag = pag->pag_agno + 1;
|
ag = pag->pag_agno + 1;
|
||||||
error = xfs_inode_walk_ag(mp, pag, execute, args, tag,
|
error = xfs_inode_walk_ag(pag, iter_flags, execute, args, tag);
|
||||||
iter_flags);
|
|
||||||
xfs_perag_put(pag);
|
xfs_perag_put(pag);
|
||||||
if (error) {
|
if (error) {
|
||||||
last_error = error;
|
last_error = error;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue