diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2018-05-04 15:31:21 -0700 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2018-05-15 17:56:59 -0700 |
commit | 554ba965407e90fed381a93f230b6ca675cfcd07 (patch) | |
tree | 908fa80f638ee270e0a5bb243c0f5bc1ae15227d /fs/xfs/xfs_dquot.h | |
parent | 28b9060bd80851d889152bc17a241fe1eddb1a0b (diff) | |
download | linux-554ba965407e90fed381a93f230b6ca675cfcd07.tar.bz2 |
xfs: refactor dquot iteration
Create a helper function to iterate all the dquots of a given type in
the system, and refactor the dquot scrub to use it. This will get more
use in the quota repair code.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/xfs_dquot.h')
-rw-r--r-- | fs/xfs/xfs_dquot.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/xfs/xfs_dquot.h b/fs/xfs/xfs_dquot.h index 113a16c37122..bdd6bd921528 100644 --- a/fs/xfs/xfs_dquot.h +++ b/fs/xfs/xfs_dquot.h @@ -194,4 +194,9 @@ static inline struct xfs_dquot *xfs_qm_dqhold(struct xfs_dquot *dqp) return dqp; } +typedef int (*xfs_qm_dqiterate_fn)(struct xfs_dquot *dq, uint dqtype, + void *priv); +int xfs_qm_dqiterate(struct xfs_mount *mp, uint dqtype, + xfs_qm_dqiterate_fn iter_fn, void *priv); + #endif /* __XFS_DQUOT_H__ */ |