summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_dquot.c
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2020-07-16 02:42:36 +0200
committerDarrick J. Wong <darrick.wong@oracle.com>2020-07-29 05:24:14 +0200
commit8cd4901da56caadc16b4e8d6b434291a8ce31d7c (patch)
treea192db893880a86d4bea26a6aae3ed58675412a3 /fs/xfs/xfs_dquot.c
parentxfs: drop the type parameter from xfs_dquot_verify (diff)
downloadlinux-8cd4901da56caadc16b4e8d6b434291a8ce31d7c.tar.xz
linux-8cd4901da56caadc16b4e8d6b434291a8ce31d7c.zip
xfs: rename XFS_DQ_{USER,GROUP,PROJ} to XFS_DQTYPE_*
We're going to split up the incore dquot state flags from the ondisk dquot flags (eventually renaming this "type") so start by renaming the three flags and the bitmask that are going to participate in this. 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_dquot.c')
-rw-r--r--fs/xfs/xfs_dquot.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/fs/xfs/xfs_dquot.c b/fs/xfs/xfs_dquot.c
index 8e84623cc331..4053e7e390f1 100644
--- a/fs/xfs/xfs_dquot.c
+++ b/fs/xfs/xfs_dquot.c
@@ -190,10 +190,10 @@ xfs_qm_init_dquot_blk(
}
}
- if (type & XFS_DQ_USER) {
+ if (type & XFS_DQTYPE_USER) {
qflag = XFS_UQUOTA_CHKD;
blftype = XFS_BLF_UDQUOT_BUF;
- } else if (type & XFS_DQ_PROJ) {
+ } else if (type & XFS_DQTYPE_PROJ) {
qflag = XFS_PQUOTA_CHKD;
blftype = XFS_BLF_PDQUOT_BUF;
} else {
@@ -311,7 +311,7 @@ xfs_dquot_disk_alloc(
* the entire thing.
*/
xfs_qm_init_dquot_blk(tp, mp, dqp->q_id,
- dqp->dq_flags & XFS_DQ_ALLTYPES, bp);
+ dqp->dq_flags & XFS_DQTYPE_REC_MASK, bp);
xfs_buf_set_ref(bp, XFS_DQUOT_REF);
/*
@@ -448,13 +448,13 @@ xfs_dquot_alloc(
* quotas.
*/
switch (type) {
- case XFS_DQ_USER:
+ case XFS_DQTYPE_USER:
/* uses the default lock class */
break;
- case XFS_DQ_GROUP:
+ case XFS_DQTYPE_GROUP:
lockdep_set_class(&dqp->q_qlock, &xfs_dquot_group_class);
break;
- case XFS_DQ_PROJ:
+ case XFS_DQTYPE_PROJ:
lockdep_set_class(&dqp->q_qlock, &xfs_dquot_project_class);
break;
default:
@@ -480,7 +480,7 @@ xfs_dquot_from_disk(
* Ensure that we got the type and ID we were looking for.
* Everything else was checked by the dquot buffer verifier.
*/
- if ((ddqp->d_flags & XFS_DQ_ALLTYPES) != dqp->dq_flags ||
+ if ((ddqp->d_flags & XFS_DQTYPE_REC_MASK) != dqp->dq_flags ||
be32_to_cpu(ddqp->d_id) != dqp->q_id) {
xfs_alert_tag(bp->b_mount, XFS_PTAG_VERIFIER_ERROR,
"Metadata corruption detected at %pS, quota %u",
@@ -530,7 +530,7 @@ xfs_dquot_to_disk(
{
ddqp->d_magic = cpu_to_be16(XFS_DQUOT_MAGIC);
ddqp->d_version = XFS_DQUOT_VERSION;
- ddqp->d_flags = dqp->dq_flags & XFS_DQ_ALLTYPES;
+ ddqp->d_flags = dqp->dq_flags & XFS_DQTYPE_REC_MASK;
ddqp->d_id = cpu_to_be32(dqp->q_id);
ddqp->d_pad0 = 0;
ddqp->d_pad = 0;
@@ -779,15 +779,15 @@ xfs_qm_dqget_checks(
return -ESRCH;
switch (type) {
- case XFS_DQ_USER:
+ case XFS_DQTYPE_USER:
if (!XFS_IS_UQUOTA_ON(mp))
return -ESRCH;
return 0;
- case XFS_DQ_GROUP:
+ case XFS_DQTYPE_GROUP:
if (!XFS_IS_GQUOTA_ON(mp))
return -ESRCH;
return 0;
- case XFS_DQ_PROJ:
+ case XFS_DQTYPE_PROJ:
if (!XFS_IS_PQUOTA_ON(mp))
return -ESRCH;
return 0;
@@ -874,11 +874,11 @@ xfs_qm_id_for_quotatype(
uint type)
{
switch (type) {
- case XFS_DQ_USER:
+ case XFS_DQTYPE_USER:
return i_uid_read(VFS_I(ip));
- case XFS_DQ_GROUP:
+ case XFS_DQTYPE_GROUP:
return i_gid_read(VFS_I(ip));
- case XFS_DQ_PROJ:
+ case XFS_DQTYPE_PROJ:
return ip->i_d.di_projid;
}
ASSERT(0);
@@ -1114,11 +1114,11 @@ static xfs_failaddr_t
xfs_qm_dqflush_check(
struct xfs_dquot *dqp)
{
- __u8 type = dqp->dq_flags & XFS_DQ_ALLTYPES;
+ __u8 type = dqp->dq_flags & XFS_DQTYPE_REC_MASK;
- if (type != XFS_DQ_USER &&
- type != XFS_DQ_GROUP &&
- type != XFS_DQ_PROJ)
+ if (type != XFS_DQTYPE_USER &&
+ type != XFS_DQTYPE_GROUP &&
+ type != XFS_DQTYPE_PROJ)
return __this_address;
if (dqp->q_id == 0)