diff options
Diffstat (limited to 'fs/xfs/quota/xfs_trans_dquot.c')
-rw-r--r-- | fs/xfs/quota/xfs_trans_dquot.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/fs/xfs/quota/xfs_trans_dquot.c b/fs/xfs/quota/xfs_trans_dquot.c index 5ae2e32ae7b7..061d827da33c 100644 --- a/fs/xfs/quota/xfs_trans_dquot.c +++ b/fs/xfs/quota/xfs_trans_dquot.c | |||
@@ -59,12 +59,11 @@ xfs_trans_dqjoin( | |||
59 | xfs_trans_t *tp, | 59 | xfs_trans_t *tp, |
60 | xfs_dquot_t *dqp) | 60 | xfs_dquot_t *dqp) |
61 | { | 61 | { |
62 | xfs_dq_logitem_t *lp; | 62 | xfs_dq_logitem_t *lp = &dqp->q_logitem; |
63 | 63 | ||
64 | ASSERT(! XFS_DQ_IS_ADDEDTO_TRX(tp, dqp)); | 64 | ASSERT(dqp->q_transp != tp); |
65 | ASSERT(XFS_DQ_IS_LOCKED(dqp)); | 65 | ASSERT(XFS_DQ_IS_LOCKED(dqp)); |
66 | ASSERT(XFS_DQ_IS_LOGITEM_INITD(dqp)); | 66 | ASSERT(lp->qli_dquot == dqp); |
67 | lp = &dqp->q_logitem; | ||
68 | 67 | ||
69 | /* | 68 | /* |
70 | * Get a log_item_desc to point at the new item. | 69 | * Get a log_item_desc to point at the new item. |
@@ -96,7 +95,7 @@ xfs_trans_log_dquot( | |||
96 | { | 95 | { |
97 | xfs_log_item_desc_t *lidp; | 96 | xfs_log_item_desc_t *lidp; |
98 | 97 | ||
99 | ASSERT(XFS_DQ_IS_ADDEDTO_TRX(tp, dqp)); | 98 | ASSERT(dqp->q_transp == tp); |
100 | ASSERT(XFS_DQ_IS_LOCKED(dqp)); | 99 | ASSERT(XFS_DQ_IS_LOCKED(dqp)); |
101 | 100 | ||
102 | lidp = xfs_trans_find_item(tp, (xfs_log_item_t*)(&dqp->q_logitem)); | 101 | lidp = xfs_trans_find_item(tp, (xfs_log_item_t*)(&dqp->q_logitem)); |
@@ -198,16 +197,16 @@ xfs_trans_get_dqtrx( | |||
198 | int i; | 197 | int i; |
199 | xfs_dqtrx_t *qa; | 198 | xfs_dqtrx_t *qa; |
200 | 199 | ||
201 | for (i = 0; i < XFS_QM_TRANS_MAXDQS; i++) { | 200 | qa = XFS_QM_ISUDQ(dqp) ? |
202 | qa = XFS_QM_DQP_TO_DQACCT(tp, dqp); | 201 | tp->t_dqinfo->dqa_usrdquots : tp->t_dqinfo->dqa_grpdquots; |
203 | 202 | ||
203 | for (i = 0; i < XFS_QM_TRANS_MAXDQS; i++) { | ||
204 | if (qa[i].qt_dquot == NULL || | 204 | if (qa[i].qt_dquot == NULL || |
205 | qa[i].qt_dquot == dqp) { | 205 | qa[i].qt_dquot == dqp) |
206 | return (&qa[i]); | 206 | return &qa[i]; |
207 | } | ||
208 | } | 207 | } |
209 | 208 | ||
210 | return (NULL); | 209 | return NULL; |
211 | } | 210 | } |
212 | 211 | ||
213 | /* | 212 | /* |
@@ -381,7 +380,7 @@ xfs_trans_apply_dquot_deltas( | |||
381 | break; | 380 | break; |
382 | 381 | ||
383 | ASSERT(XFS_DQ_IS_LOCKED(dqp)); | 382 | ASSERT(XFS_DQ_IS_LOCKED(dqp)); |
384 | ASSERT(XFS_DQ_IS_ADDEDTO_TRX(tp, dqp)); | 383 | ASSERT(dqp->q_transp == tp); |
385 | 384 | ||
386 | /* | 385 | /* |
387 | * adjust the actual number of blocks used | 386 | * adjust the actual number of blocks used |