aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Sandeen <[email protected]>2018-05-07 09:20:17 -0700
committerDarrick J. Wong <[email protected]>2018-05-09 10:04:01 -0700
commit57ab324553bbfedc8e732eb570edfac0f5cfe57e (patch)
treed0675d288dbb5a7e5101a6816e649180e2d8cd56
parente381a0f6c28a3f2a452d5fba9b917f03e5dc4ffb (diff)
xfs: check type in quota verifier during quotacheck
During quotacheck we send in the quota type, so verify that as well. Signed-off-by: Eric Sandeen <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Reviewed-by: Darrick J. Wong <[email protected]> Signed-off-by: Darrick J. Wong <[email protected]>
-rw-r--r--fs/xfs/libxfs/xfs_dquot_buf.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/xfs/libxfs/xfs_dquot_buf.c b/fs/xfs/libxfs/xfs_dquot_buf.c
index a926058f7b0c..c00174f32f0d 100644
--- a/fs/xfs/libxfs/xfs_dquot_buf.c
+++ b/fs/xfs/libxfs/xfs_dquot_buf.c
@@ -47,7 +47,7 @@ xfs_dquot_verify(
struct xfs_mount *mp,
xfs_disk_dquot_t *ddq,
xfs_dqid_t id,
- uint type) /* used only when IO_dorepair is true */
+ uint type) /* used only during quotacheck */
{
/*
* We can encounter an uninitialized dquot buffer for 2 reasons:
@@ -69,6 +69,8 @@ xfs_dquot_verify(
if (ddq->d_version != XFS_DQUOT_VERSION)
return __this_address;
+ if (type && ddq->d_flags != type)
+ return __this_address;
if (ddq->d_flags != XFS_DQ_USER &&
ddq->d_flags != XFS_DQ_PROJ &&
ddq->d_flags != XFS_DQ_GROUP)