During quotacheck we send in the quota type, so verify that as well.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
        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:
        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)