summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_qm.c
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2020-07-14 10:37:32 -0700
committerDarrick J. Wong <darrick.wong@oracle.com>2020-07-28 20:24:14 -0700
commit19dce7eaef7f8fdecab965afacc7a7bf3eb4e0a1 (patch)
tree5125284e38eab85f0785dd0a23f32ff82b9a4f42 /fs/xfs/xfs_qm.c
parentc8c45fb2f614e1d30526c5aa304352923ad76416 (diff)
downloadlinux-19dce7eaef7f8fdecab965afacc7a7bf3eb4e0a1.tar.bz2
xfs: stop using q_core timers in the quota code
Add timers fields to the incore dquot, and use that instead of the ones in qcore. This eliminates a bunch of endian conversions and will eventually allow us to remove qcore entirely. 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_qm.c')
-rw-r--r--fs/xfs/xfs_qm.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/fs/xfs/xfs_qm.c b/fs/xfs/xfs_qm.c
index 4dc989551710..73fa0b5d37b3 100644
--- a/fs/xfs/xfs_qm.c
+++ b/fs/xfs/xfs_qm.c
@@ -579,7 +579,6 @@ xfs_qm_init_timelimits(
{
struct xfs_quotainfo *qinf = mp->m_quotainfo;
struct xfs_def_quota *defq;
- struct xfs_disk_dquot *ddqp;
struct xfs_dquot *dqp;
int error;
@@ -603,19 +602,17 @@ xfs_qm_init_timelimits(
if (error)
return;
- ddqp = &dqp->q_core;
-
/*
* The warnings and timers set the grace period given to
* a user or group before he or she can not perform any
* more writing. If it is zero, a default is used.
*/
- if (ddqp->d_btimer)
- defq->btimelimit = be32_to_cpu(ddqp->d_btimer);
- if (ddqp->d_itimer)
- defq->itimelimit = be32_to_cpu(ddqp->d_itimer);
- if (ddqp->d_rtbtimer)
- defq->rtbtimelimit = be32_to_cpu(ddqp->d_rtbtimer);
+ if (dqp->q_blk.timer)
+ defq->btimelimit = dqp->q_blk.timer;
+ if (dqp->q_ino.timer)
+ defq->itimelimit = dqp->q_ino.timer;
+ if (dqp->q_rtb.timer)
+ defq->rtbtimelimit = dqp->q_rtb.timer;
if (dqp->q_blk.warnings)
defq->bwarnlimit = dqp->q_blk.warnings;
if (dqp->q_ino.warnings)