summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_trans_dquot.c
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2020-07-14 20:37:30 +0300
committerDarrick J. Wong <darrick.wong@oracle.com>2020-07-29 06:24:14 +0300
commitc51df7334167e445f2cafc5511d6e2407a32e8f1 (patch)
treee4c7d979f8769e9430e340c239d9a0d985389a3a /fs/xfs/xfs_trans_dquot.c
parent0b0fa1d1d16794ce48188cc6434ec38f6e1f1b4b (diff)
downloadlinux-c51df7334167e445f2cafc5511d6e2407a32e8f1.tar.xz
xfs: stop using q_core.d_id in the quota code
Add a dquot id field to the incore dquot, and use that instead of the one in qcore. This eliminates a bunch of endian conversions and will eventually allow us to remove qcore entirely. We also rearrange the start of xfs_dquot to remove padding holes, saving 8 bytes. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Chandan Babu R <chandanrlinux@gmail.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Allison Collins <allison.henderson@oracle.com>
Diffstat (limited to 'fs/xfs/xfs_trans_dquot.c')
-rw-r--r--fs/xfs/xfs_trans_dquot.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/xfs/xfs_trans_dquot.c b/fs/xfs/xfs_trans_dquot.c
index 8963cfac2a6a..8dd6aa6e8fa3 100644
--- a/fs/xfs/xfs_trans_dquot.c
+++ b/fs/xfs/xfs_trans_dquot.c
@@ -386,7 +386,7 @@ xfs_trans_apply_dquot_deltas(
* Get any default limits in use.
* Start/reset the timer(s) if needed.
*/
- if (d->d_id) {
+ if (dqp->q_id) {
xfs_qm_adjust_dqlimits(tp->t_mountp, dqp);
xfs_qm_adjust_dqtimers(tp->t_mountp, dqp);
}
@@ -558,8 +558,7 @@ xfs_quota_warn(
else
qtype = GRPQUOTA;
- quota_send_warning(make_kqid(&init_user_ns, qtype,
- be32_to_cpu(dqp->q_core.d_id)),
+ quota_send_warning(make_kqid(&init_user_ns, qtype, dqp->q_id),
mp->m_super->s_dev, type);
}
@@ -618,8 +617,7 @@ xfs_trans_dqresv(
resbcountp = &dqp->q_res_rtbcount;
}
- if ((flags & XFS_QMOPT_FORCE_RES) == 0 &&
- dqp->q_core.d_id &&
+ if ((flags & XFS_QMOPT_FORCE_RES) == 0 && dqp->q_id &&
((XFS_IS_UQUOTA_ENFORCED(dqp->q_mount) && XFS_QM_ISUDQ(dqp)) ||
(XFS_IS_GQUOTA_ENFORCED(dqp->q_mount) && XFS_QM_ISGDQ(dqp)) ||
(XFS_IS_PQUOTA_ENFORCED(dqp->q_mount) && XFS_QM_ISPDQ(dqp)))) {