diff options
Diffstat (limited to 'fs/xfs/xfs_dquot.c')
-rw-r--r-- | fs/xfs/xfs_dquot.c | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/fs/xfs/xfs_dquot.c b/fs/xfs/xfs_dquot.c index db62959bed13..25d7280e9f6b 100644 --- a/fs/xfs/xfs_dquot.c +++ b/fs/xfs/xfs_dquot.c | |||
@@ -377,16 +377,14 @@ xfs_qm_dqalloc( | |||
377 | return (ESRCH); | 377 | return (ESRCH); |
378 | } | 378 | } |
379 | 379 | ||
380 | xfs_trans_ijoin_ref(tp, quotip, XFS_ILOCK_EXCL); | 380 | xfs_trans_ijoin(tp, quotip, XFS_ILOCK_EXCL); |
381 | nmaps = 1; | 381 | nmaps = 1; |
382 | if ((error = xfs_bmapi(tp, quotip, | 382 | error = xfs_bmapi_write(tp, quotip, offset_fsb, |
383 | offset_fsb, XFS_DQUOT_CLUSTER_SIZE_FSB, | 383 | XFS_DQUOT_CLUSTER_SIZE_FSB, XFS_BMAPI_METADATA, |
384 | XFS_BMAPI_METADATA | XFS_BMAPI_WRITE, | 384 | &firstblock, XFS_QM_DQALLOC_SPACE_RES(mp), |
385 | &firstblock, | 385 | &map, &nmaps, &flist); |
386 | XFS_QM_DQALLOC_SPACE_RES(mp), | 386 | if (error) |
387 | &map, &nmaps, &flist))) { | ||
388 | goto error0; | 387 | goto error0; |
389 | } | ||
390 | ASSERT(map.br_blockcount == XFS_DQUOT_CLUSTER_SIZE_FSB); | 388 | ASSERT(map.br_blockcount == XFS_DQUOT_CLUSTER_SIZE_FSB); |
391 | ASSERT(nmaps == 1); | 389 | ASSERT(nmaps == 1); |
392 | ASSERT((map.br_startblock != DELAYSTARTBLOCK) && | 390 | ASSERT((map.br_startblock != DELAYSTARTBLOCK) && |
@@ -402,8 +400,11 @@ xfs_qm_dqalloc( | |||
402 | dqp->q_blkno, | 400 | dqp->q_blkno, |
403 | mp->m_quotainfo->qi_dqchunklen, | 401 | mp->m_quotainfo->qi_dqchunklen, |
404 | 0); | 402 | 0); |
405 | if (!bp || (error = xfs_buf_geterror(bp))) | 403 | |
404 | error = xfs_buf_geterror(bp); | ||
405 | if (error) | ||
406 | goto error1; | 406 | goto error1; |
407 | |||
407 | /* | 408 | /* |
408 | * Make a chunk of dquots out of this buffer and log | 409 | * Make a chunk of dquots out of this buffer and log |
409 | * the entire thing. | 410 | * the entire thing. |
@@ -485,9 +486,8 @@ xfs_qm_dqtobp( | |||
485 | /* | 486 | /* |
486 | * Find the block map; no allocations yet | 487 | * Find the block map; no allocations yet |
487 | */ | 488 | */ |
488 | error = xfs_bmapi(NULL, quotip, dqp->q_fileoffset, | 489 | error = xfs_bmapi_read(quotip, dqp->q_fileoffset, |
489 | XFS_DQUOT_CLUSTER_SIZE_FSB, XFS_BMAPI_METADATA, | 490 | XFS_DQUOT_CLUSTER_SIZE_FSB, &map, &nmaps, 0); |
490 | NULL, 0, &map, &nmaps, NULL); | ||
491 | 491 | ||
492 | xfs_iunlock(quotip, XFS_ILOCK_SHARED); | 492 | xfs_iunlock(quotip, XFS_ILOCK_SHARED); |
493 | if (error) | 493 | if (error) |
@@ -605,7 +605,7 @@ xfs_qm_dqread( | |||
605 | dqp->q_res_rtbcount = be64_to_cpu(ddqp->d_rtbcount); | 605 | dqp->q_res_rtbcount = be64_to_cpu(ddqp->d_rtbcount); |
606 | 606 | ||
607 | /* Mark the buf so that this will stay incore a little longer */ | 607 | /* Mark the buf so that this will stay incore a little longer */ |
608 | XFS_BUF_SET_VTYPE_REF(bp, B_FS_DQUOT, XFS_DQUOT_REF); | 608 | xfs_buf_set_ref(bp, XFS_DQUOT_REF); |
609 | 609 | ||
610 | /* | 610 | /* |
611 | * We got the buffer with a xfs_trans_read_buf() (in dqtobp()) | 611 | * We got the buffer with a xfs_trans_read_buf() (in dqtobp()) |
@@ -1242,9 +1242,11 @@ xfs_qm_dqflush( | |||
1242 | } | 1242 | } |
1243 | 1243 | ||
1244 | if (flags & SYNC_WAIT) | 1244 | if (flags & SYNC_WAIT) |
1245 | error = xfs_bwrite(mp, bp); | 1245 | error = xfs_bwrite(bp); |
1246 | else | 1246 | else |
1247 | xfs_bdwrite(mp, bp); | 1247 | xfs_buf_delwri_queue(bp); |
1248 | |||
1249 | xfs_buf_relse(bp); | ||
1248 | 1250 | ||
1249 | trace_xfs_dqflush_done(dqp); | 1251 | trace_xfs_dqflush_done(dqp); |
1250 | 1252 | ||