aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/quota/xfs_dquot.c
diff options
context:
space:
mode:
authorDave Chinner <david@fromorbit.com>2010-02-03 17:48:58 -0500
committerDave Chinner <david@fromorbit.com>2010-02-03 17:48:58 -0500
commit20026d92013d7bb3abb295337191def6758fc086 (patch)
tree7cacdf4b14799534f9907833bd28500cb739a823 /fs/xfs/quota/xfs_dquot.c
parent7d6a7bde52e449f21a0e86a7a4955b4e08a49d69 (diff)
xfs: kill the unused XFS_QMOPT_* flush flags V2
dquots are never flushed asynchronously. Remove the flag and the async write support from the flush function. Make the default flush a delwri flush to make the inode flush code, which leaves the XFS_QMOPT_SYNC the only flag remaining. Convert that to use SYNC_WAIT instead, just like the inode flush code. V2: - just pass flush flags straight through Signed-off-by: Dave Chinner <david@fromorbit.com> Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/quota/xfs_dquot.c')
-rw-r--r--fs/xfs/quota/xfs_dquot.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/fs/xfs/quota/xfs_dquot.c b/fs/xfs/quota/xfs_dquot.c
index 1620a56b067e..5f79dd78626b 100644
--- a/fs/xfs/quota/xfs_dquot.c
+++ b/fs/xfs/quota/xfs_dquot.c
@@ -1187,7 +1187,7 @@ xfs_qm_dqflush(
1187 * block, nada. 1187 * block, nada.
1188 */ 1188 */
1189 if (!XFS_DQ_IS_DIRTY(dqp) || 1189 if (!XFS_DQ_IS_DIRTY(dqp) ||
1190 (!(flags & XFS_QMOPT_SYNC) && atomic_read(&dqp->q_pincount) > 0)) { 1190 (!(flags & SYNC_WAIT) && atomic_read(&dqp->q_pincount) > 0)) {
1191 xfs_dqfunlock(dqp); 1191 xfs_dqfunlock(dqp);
1192 return 0; 1192 return 0;
1193 } 1193 }
@@ -1251,18 +1251,17 @@ xfs_qm_dqflush(
1251 xfs_log_force(mp, 0); 1251 xfs_log_force(mp, 0);
1252 } 1252 }
1253 1253
1254 if (flags & XFS_QMOPT_DELWRI) { 1254 if (flags & SYNC_WAIT)
1255 xfs_bdwrite(mp, bp);
1256 } else {
1257 error = xfs_bwrite(mp, bp); 1255 error = xfs_bwrite(mp, bp);
1258 } 1256 else
1257 xfs_bdwrite(mp, bp);
1259 1258
1260 trace_xfs_dqflush_done(dqp); 1259 trace_xfs_dqflush_done(dqp);
1261 1260
1262 /* 1261 /*
1263 * dqp is still locked, but caller is free to unlock it now. 1262 * dqp is still locked, but caller is free to unlock it now.
1264 */ 1263 */
1265 return (error); 1264 return error;
1266 1265
1267} 1266}
1268 1267
@@ -1443,7 +1442,7 @@ xfs_qm_dqpurge(
1443 * We don't care about getting disk errors here. We need 1442 * We don't care about getting disk errors here. We need
1444 * to purge this dquot anyway, so we go ahead regardless. 1443 * to purge this dquot anyway, so we go ahead regardless.
1445 */ 1444 */
1446 error = xfs_qm_dqflush(dqp, XFS_QMOPT_SYNC); 1445 error = xfs_qm_dqflush(dqp, SYNC_WAIT);
1447 if (error) 1446 if (error)
1448 xfs_fs_cmn_err(CE_WARN, mp, 1447 xfs_fs_cmn_err(CE_WARN, mp,
1449 "xfs_qm_dqpurge: dquot %p flush failed", dqp); 1448 "xfs_qm_dqpurge: dquot %p flush failed", dqp);