aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/quota/xfs_dquot.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/quota/xfs_dquot.c')
-rw-r--r--fs/xfs/quota/xfs_dquot.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/fs/xfs/quota/xfs_dquot.c b/fs/xfs/quota/xfs_dquot.c
index 665babcca6a6..631ebb31b295 100644
--- a/fs/xfs/quota/xfs_dquot.c
+++ b/fs/xfs/quota/xfs_dquot.c
@@ -1291,7 +1291,7 @@ xfs_qm_dqflush(
1291 if (flags & XFS_QMOPT_DELWRI) { 1291 if (flags & XFS_QMOPT_DELWRI) {
1292 xfs_bdwrite(mp, bp); 1292 xfs_bdwrite(mp, bp);
1293 } else if (flags & XFS_QMOPT_ASYNC) { 1293 } else if (flags & XFS_QMOPT_ASYNC) {
1294 xfs_bawrite(mp, bp); 1294 error = xfs_bawrite(mp, bp);
1295 } else { 1295 } else {
1296 error = xfs_bwrite(mp, bp); 1296 error = xfs_bwrite(mp, bp);
1297 } 1297 }
@@ -1439,9 +1439,7 @@ xfs_qm_dqpurge(
1439 uint flags) 1439 uint flags)
1440{ 1440{
1441 xfs_dqhash_t *thishash; 1441 xfs_dqhash_t *thishash;
1442 xfs_mount_t *mp; 1442 xfs_mount_t *mp = dqp->q_mount;
1443
1444 mp = dqp->q_mount;
1445 1443
1446 ASSERT(XFS_QM_IS_MPLIST_LOCKED(mp)); 1444 ASSERT(XFS_QM_IS_MPLIST_LOCKED(mp));
1447 ASSERT(XFS_DQ_IS_HASH_LOCKED(dqp->q_hash)); 1445 ASSERT(XFS_DQ_IS_HASH_LOCKED(dqp->q_hash));
@@ -1485,6 +1483,7 @@ xfs_qm_dqpurge(
1485 * we're unmounting, we do care, so we flush it and wait. 1483 * we're unmounting, we do care, so we flush it and wait.
1486 */ 1484 */
1487 if (XFS_DQ_IS_DIRTY(dqp)) { 1485 if (XFS_DQ_IS_DIRTY(dqp)) {
1486 int error;
1488 xfs_dqtrace_entry(dqp, "DQPURGE ->DQFLUSH: DQDIRTY"); 1487 xfs_dqtrace_entry(dqp, "DQPURGE ->DQFLUSH: DQDIRTY");
1489 /* dqflush unlocks dqflock */ 1488 /* dqflush unlocks dqflock */
1490 /* 1489 /*
@@ -1495,7 +1494,10 @@ xfs_qm_dqpurge(
1495 * We don't care about getting disk errors here. We need 1494 * We don't care about getting disk errors here. We need
1496 * to purge this dquot anyway, so we go ahead regardless. 1495 * to purge this dquot anyway, so we go ahead regardless.
1497 */ 1496 */
1498 (void) xfs_qm_dqflush(dqp, XFS_QMOPT_SYNC); 1497 error = xfs_qm_dqflush(dqp, XFS_QMOPT_SYNC);
1498 if (error)
1499 xfs_fs_cmn_err(CE_WARN, mp,
1500 "xfs_qm_dqpurge: dquot %p flush failed", dqp);
1499 xfs_dqflock(dqp); 1501 xfs_dqflock(dqp);
1500 } 1502 }
1501 ASSERT(dqp->q_pincount == 0); 1503 ASSERT(dqp->q_pincount == 0);
@@ -1580,12 +1582,18 @@ xfs_qm_dqflock_pushbuf_wait(
1580 XFS_INCORE_TRYLOCK); 1582 XFS_INCORE_TRYLOCK);
1581 if (bp != NULL) { 1583 if (bp != NULL) {
1582 if (XFS_BUF_ISDELAYWRITE(bp)) { 1584 if (XFS_BUF_ISDELAYWRITE(bp)) {
1585 int error;
1583 if (XFS_BUF_ISPINNED(bp)) { 1586 if (XFS_BUF_ISPINNED(bp)) {
1584 xfs_log_force(dqp->q_mount, 1587 xfs_log_force(dqp->q_mount,
1585 (xfs_lsn_t)0, 1588 (xfs_lsn_t)0,
1586 XFS_LOG_FORCE); 1589 XFS_LOG_FORCE);
1587 } 1590 }
1588 xfs_bawrite(dqp->q_mount, bp); 1591 error = xfs_bawrite(dqp->q_mount, bp);
1592 if (error)
1593 xfs_fs_cmn_err(CE_WARN, dqp->q_mount,
1594 "xfs_qm_dqflock_pushbuf_wait: "
1595 "pushbuf error %d on dqp %p, bp %p",
1596 error, dqp, bp);
1589 } else { 1597 } else {
1590 xfs_buf_relse(bp); 1598 xfs_buf_relse(bp);
1591 } 1599 }