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>
This commit is contained in:
@@ -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__ */
|
||||
|
Reference in New Issue
Block a user