From: David Chinner Date: Thu, 10 Apr 2008 02:20:17 +0000 (+1000) Subject: [XFS] Propagate xfs_qm_dqflush_all() errors. X-Git-Tag: v2.6.26-rc1~1147^2~39 X-Git-Url: http://pileus.org/git/?a=commitdiff_plain;h=4b8879df8c21bed3efd1eb2da5d72501199aba29;hp=5b1397385bf536cbdb60f3362f44079d15d5f5ee;p=~andy%2Flinux [XFS] Propagate xfs_qm_dqflush_all() errors. xfs_qm_dqflush_all() can return flush errors. Ensure they are propagated into the quotacheck code to determine if the quotacheck succeeded or not. SGI-PV: 980084 SGI-Modid: xfs-linux-melb:xfs-kern:30786a Signed-off-by: David Chinner Signed-off-by: Niv Sardi Signed-off-by: Lachlan McIlroy --- diff --git a/fs/xfs/quota/xfs_qm.c b/fs/xfs/quota/xfs_qm.c index dec5f95e847..04b29c67214 100644 --- a/fs/xfs/quota/xfs_qm.c +++ b/fs/xfs/quota/xfs_qm.c @@ -1877,6 +1877,14 @@ xfs_qm_quotacheck( } while (! done); + /* + * We've made all the changes that we need to make incore. + * Flush them down to disk buffers if everything was updated + * successfully. + */ + if (!error) + error = xfs_qm_dqflush_all(mp, XFS_QMOPT_DELWRI); + /* * We can get this error if we couldn't do a dquot allocation inside * xfs_qm_dqusage_adjust (via bulkstat). We don't care about the @@ -1888,11 +1896,6 @@ xfs_qm_quotacheck( xfs_qm_dqpurge_all(mp, XFS_QMOPT_QUOTALL | XFS_QMOPT_QUOTAOFF); goto error_return; } - /* - * We've made all the changes that we need to make incore. - * Now flush_them down to disk buffers. - */ - xfs_qm_dqflush_all(mp, XFS_QMOPT_DELWRI); /* * We didn't log anything, because if we crashed, we'll have to