xfs: pass xfs_dquot to xfs_qm_adjust_dqlimits() instead of xfs_disk_dquot_t
authorBrian Foster <bfoster@redhat.com>
Mon, 18 Mar 2013 14:51:45 +0000 (10:51 -0400)
committerBen Myers <bpm@sgi.com>
Fri, 22 Mar 2013 21:05:52 +0000 (16:05 -0500)
Modify xfs_qm_adjust_dqlimits() to take the xfs_dquot as a
parameter instead of just the xfs_disk_dquot_t so we can update
in-memory fields if necessary.

Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
fs/xfs/xfs_dquot.c
fs/xfs/xfs_dquot.h
fs/xfs/xfs_qm.c
fs/xfs/xfs_trans_dquot.c

index 8025eb23ad7274611a644b523b45f1322099fa5a..9c5869e60f9775367b0632199fa62f40979bae6d 100644 (file)
@@ -85,10 +85,11 @@ xfs_qm_dqdestroy(
  */
 void
 xfs_qm_adjust_dqlimits(
-       xfs_mount_t             *mp,
-       xfs_disk_dquot_t        *d)
+       struct xfs_mount        *mp,
+       struct xfs_dquot        *dq)
 {
-       xfs_quotainfo_t         *q = mp->m_quotainfo;
+       struct xfs_quotainfo    *q = mp->m_quotainfo;
+       struct xfs_disk_dquot   *d = &dq->q_core;
 
        ASSERT(d->d_id);
 
index c694a8469c4a0b6567fc67c64841a7b97ffd0779..f77b711455b1042c5411447f12f2c7730309a1ac 100644 (file)
@@ -145,8 +145,8 @@ extern int          xfs_qm_dqflush(struct xfs_dquot *, struct xfs_buf **);
 extern void            xfs_qm_dqunpin_wait(xfs_dquot_t *);
 extern void            xfs_qm_adjust_dqtimers(xfs_mount_t *,
                                        xfs_disk_dquot_t *);
-extern void            xfs_qm_adjust_dqlimits(xfs_mount_t *,
-                                       xfs_disk_dquot_t *);
+extern void            xfs_qm_adjust_dqlimits(struct xfs_mount *,
+                                              struct xfs_dquot *);
 extern int             xfs_qm_dqget(xfs_mount_t *, xfs_inode_t *,
                                        xfs_dqid_t, uint, uint, xfs_dquot_t **);
 extern void            xfs_qm_dqput(xfs_dquot_t *);
index e5b5cf973781b5bba4188144dd9b3bf4a69f022c..d0acb4e40a6fd71e4d6c23f2a2d3dfed3dc54abf 100644 (file)
@@ -1057,7 +1057,7 @@ xfs_qm_quotacheck_dqadjust(
         * There are no timers for the default values set in the root dquot.
         */
        if (dqp->q_core.d_id) {
-               xfs_qm_adjust_dqlimits(mp, &dqp->q_core);
+               xfs_qm_adjust_dqlimits(mp, dqp);
                xfs_qm_adjust_dqtimers(mp, &dqp->q_core);
        }
 
index 642c2d6e1db163b47e7368013754ffec46811e37..fec75d0237031a5d030f2bbaa7057ecc0f28092a 100644 (file)
@@ -326,12 +326,12 @@ xfs_trans_dqlockedjoin(
  */
 void
 xfs_trans_apply_dquot_deltas(
-       xfs_trans_t             *tp)
+       struct xfs_trans        *tp)
 {
        int                     i, j;
-       xfs_dquot_t             *dqp;
-       xfs_dqtrx_t             *qtrx, *qa;
-       xfs_disk_dquot_t        *d;
+       struct xfs_dquot        *dqp;
+       struct xfs_dqtrx        *qtrx, *qa;
+       struct xfs_disk_dquot   *d;
        long                    totalbdelta;
        long                    totalrtbdelta;
 
@@ -412,7 +412,7 @@ xfs_trans_apply_dquot_deltas(
                         * Start/reset the timer(s) if needed.
                         */
                        if (d->d_id) {
-                               xfs_qm_adjust_dqlimits(tp->t_mountp, d);
+                               xfs_qm_adjust_dqlimits(tp->t_mountp, dqp);
                                xfs_qm_adjust_dqtimers(tp->t_mountp, d);
                        }