diff options
author | Brian Foster <bfoster@redhat.com> | 2013-03-18 10:51:45 -0400 |
---|---|---|
committer | Ben Myers <bpm@sgi.com> | 2013-03-22 17:05:52 -0400 |
commit | 4b6eae2e6ac8a6671839ccaea1c2e3dd5684f5df (patch) | |
tree | f10d88c625429675ba36a1c0a3bc013a737891c2 | |
parent | c9bdbdc0741d90908f492415c890b630f43f17f8 (diff) |
xfs: pass xfs_dquot to xfs_qm_adjust_dqlimits() instead of xfs_disk_dquot_t
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>
-rw-r--r-- | fs/xfs/xfs_dquot.c | 7 | ||||
-rw-r--r-- | fs/xfs/xfs_dquot.h | 4 | ||||
-rw-r--r-- | fs/xfs/xfs_qm.c | 2 | ||||
-rw-r--r-- | fs/xfs/xfs_trans_dquot.c | 10 |
4 files changed, 12 insertions, 11 deletions
diff --git a/fs/xfs/xfs_dquot.c b/fs/xfs/xfs_dquot.c index 8025eb23ad72..9c5869e60f97 100644 --- a/fs/xfs/xfs_dquot.c +++ b/fs/xfs/xfs_dquot.c | |||
@@ -85,10 +85,11 @@ xfs_qm_dqdestroy( | |||
85 | */ | 85 | */ |
86 | void | 86 | void |
87 | xfs_qm_adjust_dqlimits( | 87 | xfs_qm_adjust_dqlimits( |
88 | xfs_mount_t *mp, | 88 | struct xfs_mount *mp, |
89 | xfs_disk_dquot_t *d) | 89 | struct xfs_dquot *dq) |
90 | { | 90 | { |
91 | xfs_quotainfo_t *q = mp->m_quotainfo; | 91 | struct xfs_quotainfo *q = mp->m_quotainfo; |
92 | struct xfs_disk_dquot *d = &dq->q_core; | ||
92 | 93 | ||
93 | ASSERT(d->d_id); | 94 | ASSERT(d->d_id); |
94 | 95 | ||
diff --git a/fs/xfs/xfs_dquot.h b/fs/xfs/xfs_dquot.h index c694a8469c4a..f77b711455b1 100644 --- a/fs/xfs/xfs_dquot.h +++ b/fs/xfs/xfs_dquot.h | |||
@@ -145,8 +145,8 @@ extern int xfs_qm_dqflush(struct xfs_dquot *, struct xfs_buf **); | |||
145 | extern void xfs_qm_dqunpin_wait(xfs_dquot_t *); | 145 | extern void xfs_qm_dqunpin_wait(xfs_dquot_t *); |
146 | extern void xfs_qm_adjust_dqtimers(xfs_mount_t *, | 146 | extern void xfs_qm_adjust_dqtimers(xfs_mount_t *, |
147 | xfs_disk_dquot_t *); | 147 | xfs_disk_dquot_t *); |
148 | extern void xfs_qm_adjust_dqlimits(xfs_mount_t *, | 148 | extern void xfs_qm_adjust_dqlimits(struct xfs_mount *, |
149 | xfs_disk_dquot_t *); | 149 | struct xfs_dquot *); |
150 | extern int xfs_qm_dqget(xfs_mount_t *, xfs_inode_t *, | 150 | extern int xfs_qm_dqget(xfs_mount_t *, xfs_inode_t *, |
151 | xfs_dqid_t, uint, uint, xfs_dquot_t **); | 151 | xfs_dqid_t, uint, uint, xfs_dquot_t **); |
152 | extern void xfs_qm_dqput(xfs_dquot_t *); | 152 | extern void xfs_qm_dqput(xfs_dquot_t *); |
diff --git a/fs/xfs/xfs_qm.c b/fs/xfs/xfs_qm.c index e5b5cf973781..d0acb4e40a6f 100644 --- a/fs/xfs/xfs_qm.c +++ b/fs/xfs/xfs_qm.c | |||
@@ -1057,7 +1057,7 @@ xfs_qm_quotacheck_dqadjust( | |||
1057 | * There are no timers for the default values set in the root dquot. | 1057 | * There are no timers for the default values set in the root dquot. |
1058 | */ | 1058 | */ |
1059 | if (dqp->q_core.d_id) { | 1059 | if (dqp->q_core.d_id) { |
1060 | xfs_qm_adjust_dqlimits(mp, &dqp->q_core); | 1060 | xfs_qm_adjust_dqlimits(mp, dqp); |
1061 | xfs_qm_adjust_dqtimers(mp, &dqp->q_core); | 1061 | xfs_qm_adjust_dqtimers(mp, &dqp->q_core); |
1062 | } | 1062 | } |
1063 | 1063 | ||
diff --git a/fs/xfs/xfs_trans_dquot.c b/fs/xfs/xfs_trans_dquot.c index 642c2d6e1db1..fec75d023703 100644 --- a/fs/xfs/xfs_trans_dquot.c +++ b/fs/xfs/xfs_trans_dquot.c | |||
@@ -326,12 +326,12 @@ xfs_trans_dqlockedjoin( | |||
326 | */ | 326 | */ |
327 | void | 327 | void |
328 | xfs_trans_apply_dquot_deltas( | 328 | xfs_trans_apply_dquot_deltas( |
329 | xfs_trans_t *tp) | 329 | struct xfs_trans *tp) |
330 | { | 330 | { |
331 | int i, j; | 331 | int i, j; |
332 | xfs_dquot_t *dqp; | 332 | struct xfs_dquot *dqp; |
333 | xfs_dqtrx_t *qtrx, *qa; | 333 | struct xfs_dqtrx *qtrx, *qa; |
334 | xfs_disk_dquot_t *d; | 334 | struct xfs_disk_dquot *d; |
335 | long totalbdelta; | 335 | long totalbdelta; |
336 | long totalrtbdelta; | 336 | long totalrtbdelta; |
337 | 337 | ||
@@ -412,7 +412,7 @@ xfs_trans_apply_dquot_deltas( | |||
412 | * Start/reset the timer(s) if needed. | 412 | * Start/reset the timer(s) if needed. |
413 | */ | 413 | */ |
414 | if (d->d_id) { | 414 | if (d->d_id) { |
415 | xfs_qm_adjust_dqlimits(tp->t_mountp, d); | 415 | xfs_qm_adjust_dqlimits(tp->t_mountp, dqp); |
416 | xfs_qm_adjust_dqtimers(tp->t_mountp, d); | 416 | xfs_qm_adjust_dqtimers(tp->t_mountp, d); |
417 | } | 417 | } |
418 | 418 | ||