aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/quota/xfs_dquot.c
diff options
context:
space:
mode:
authorDavid Chinner <dgc@sgi.com>2008-04-09 22:22:24 -0400
committerLachlan McIlroy <lachlan@redback.melbourne.sgi.com>2008-04-17 22:00:35 -0400
commitdb7a19f2c89d99b66874a7e0c0dc681ff1f37b4e (patch)
treedd242710a41839617eae7a8b7e71f6effb4d608c /fs/xfs/quota/xfs_dquot.c
parentd64e31a2f53cdcb2f95b782196faacb0995ca0c0 (diff)
[XFS] Ensure xfs_bawrite() errors are checked.
xfs_bawrite() can return immediate error status on async writes. Unlike xfsbdstrat() we don't ever check the error on the buffer after the call, so we currently do not catch errors at all here. Ensure we catch and propagate or warn to the syslog about up-front async write errors. SGI-PV: 980084 SGI-Modid: xfs-linux-melb:xfs-kern:30824a Signed-off-by: David Chinner <dgc@sgi.com> Signed-off-by: Niv Sardi <xaiki@sgi.com> Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Diffstat (limited to 'fs/xfs/quota/xfs_dquot.c')
-rw-r--r--fs/xfs/quota/xfs_dquot.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/fs/xfs/quota/xfs_dquot.c b/fs/xfs/quota/xfs_dquot.c
index 15214fbb9aa7..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 }
@@ -1582,12 +1582,18 @@ xfs_qm_dqflock_pushbuf_wait(
1582 XFS_INCORE_TRYLOCK); 1582 XFS_INCORE_TRYLOCK);
1583 if (bp != NULL) { 1583 if (bp != NULL) {
1584 if (XFS_BUF_ISDELAYWRITE(bp)) { 1584 if (XFS_BUF_ISDELAYWRITE(bp)) {
1585 int error;
1585 if (XFS_BUF_ISPINNED(bp)) { 1586 if (XFS_BUF_ISPINNED(bp)) {
1586 xfs_log_force(dqp->q_mount, 1587 xfs_log_force(dqp->q_mount,
1587 (xfs_lsn_t)0, 1588 (xfs_lsn_t)0,
1588 XFS_LOG_FORCE); 1589 XFS_LOG_FORCE);
1589 } 1590 }
1590 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);
1591 } else { 1597 } else {
1592 xfs_buf_relse(bp); 1598 xfs_buf_relse(bp);
1593 } 1599 }