summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_qm.c
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2020-07-15 17:41:24 -0700
committerDarrick J. Wong <darrick.wong@oracle.com>2020-07-28 20:24:14 -0700
commitf9751c4ad3d17fa93773c187732f10c8a49940e3 (patch)
tree9fdb8c79440eceef3c56b7d3f9d39ad2d65d8515 /fs/xfs/xfs_qm.c
parent2cb91bab4fa4effe56da1c7fe2fc5723c4935db1 (diff)
xfs: drop the type parameter from xfs_dquot_verify
xfs_qm_reset_dqcounts (aka quotacheck) is the only xfs_dqblk_verify caller that actually knows the specific quota type that it's looking for. Since everything else just pass in type==0 (including the buffer verifier), drop the parameter and open-code the check like xfs_dquot_from_disk already does. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/xfs_qm.c')
-rw-r--r--fs/xfs/xfs_qm.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/xfs/xfs_qm.c b/fs/xfs/xfs_qm.c
index 7d83c1623cb2..bf94c1bbda16 100644
--- a/fs/xfs/xfs_qm.c
+++ b/fs/xfs/xfs_qm.c
@@ -830,7 +830,6 @@ xfs_qm_reset_dqcounts(
{
struct xfs_dqblk *dqb;
int j;
- xfs_failaddr_t fa;
trace_xfs_reset_dqcounts(bp, _RET_IP_);
@@ -855,8 +854,8 @@ xfs_qm_reset_dqcounts(
* find uninitialised dquot blks. See comment in
* xfs_dquot_verify.
*/
- fa = xfs_dqblk_verify(mp, &dqb[j], id + j, type);
- if (fa)
+ if (xfs_dqblk_verify(mp, &dqb[j], id + j) ||
+ (dqb[j].dd_diskdq.d_flags & XFS_DQ_ALLTYPES) != type)
xfs_dqblk_repair(mp, &dqb[j], id + j, type);
/*