* block, nada.
         */
        if (!XFS_DQ_IS_DIRTY(dqp) ||
-           (!(flags & XFS_QMOPT_SYNC) && atomic_read(&dqp->q_pincount) > 0)) {
+           (!(flags & SYNC_WAIT) && atomic_read(&dqp->q_pincount) > 0)) {
                xfs_dqfunlock(dqp);
                return 0;
        }
                xfs_log_force(mp, 0);
        }
 
-       if (flags & XFS_QMOPT_DELWRI) {
-               xfs_bdwrite(mp, bp);
-       } else {
+       if (flags & SYNC_WAIT)
                error = xfs_bwrite(mp, bp);
-       }
+       else
+               xfs_bdwrite(mp, bp);
 
        trace_xfs_dqflush_done(dqp);
 
        /*
         * dqp is still locked, but caller is free to unlock it now.
         */
-       return (error);
+       return error;
 
 }
 
                 * We don't care about getting disk errors here. We need
                 * to purge this dquot anyway, so we go ahead regardless.
                 */
-               error = xfs_qm_dqflush(dqp, XFS_QMOPT_SYNC);
+               error = xfs_qm_dqflush(dqp, SYNC_WAIT);
                if (error)
                        xfs_fs_cmn_err(CE_WARN, mp,
                                "xfs_qm_dqpurge: dquot %p flush failed", dqp);
 
         * lock without sleeping, then there must not have been
         * anyone in the process of flushing the dquot.
         */
-       error = xfs_qm_dqflush(dqp, XFS_QMOPT_DELWRI);
+       error = xfs_qm_dqflush(dqp, 0);
        if (error)
                xfs_fs_cmn_err(CE_WARN, dqp->q_mount,
                        "xfs_qm_dquot_logitem_push: push error %d on dqp %p",
 
 STATIC int
 xfs_qm_dqflush_all(
        xfs_mount_t     *mp,
-       int             flags)
+       int             sync_mode)
 {
        int             recl;
        xfs_dquot_t     *dqp;
                 * across a disk write.
                 */
                xfs_qm_mplist_unlock(mp);
-               error = xfs_qm_dqflush(dqp, flags);
+               error = xfs_qm_dqflush(dqp, sync_mode);
                xfs_dqunlock(dqp);
                if (error)
                        return error;
 {
        int             recl, restarts;
        xfs_dquot_t     *dqp;
-       uint            flush_flags;
        int             error;
 
        if (!XFS_IS_QUOTA_RUNNING(mp) || !XFS_IS_QUOTA_ON(mp))
                return 0;
 
-       flush_flags = (flags & SYNC_WAIT) ? XFS_QMOPT_SYNC : XFS_QMOPT_DELWRI;
        restarts = 0;
 
   again:
                 * across a disk write
                 */
                xfs_qm_mplist_unlock(mp);
-               error = xfs_qm_dqflush(dqp, flush_flags);
+               error = xfs_qm_dqflush(dqp, flags);
                xfs_dqunlock(dqp);
                if (error && XFS_FORCED_SHUTDOWN(mp))
                        return 0;       /* Need to prevent umount failure */
         * successfully.
         */
        if (!error)
-               error = xfs_qm_dqflush_all(mp, XFS_QMOPT_DELWRI);
+               error = xfs_qm_dqflush_all(mp, 0);
 
        /*
         * We can get this error if we couldn't do a dquot allocation inside
                         * We flush it delayed write, so don't bother
                         * releasing the mplock.
                         */
-                       error = xfs_qm_dqflush(dqp, XFS_QMOPT_DELWRI);
+                       error = xfs_qm_dqflush(dqp, 0);
                        if (error) {
                                xfs_fs_cmn_err(CE_WARN, dqp->q_mount,
                        "xfs_qm_dqflush_all: dquot %p flush failed", dqp);
                         * We flush it delayed write, so don't bother
                         * releasing the freelist lock.
                         */
-                       error = xfs_qm_dqflush(dqp, XFS_QMOPT_DELWRI);
+                       error = xfs_qm_dqflush(dqp, 0);
                        if (error) {
                                xfs_fs_cmn_err(CE_WARN, dqp->q_mount,
                        "xfs_qm_dqreclaim: dquot %p flush failed", dqp);
 
 #define XFS_QMOPT_DELRTBCOUNT  0x0400000
 #define XFS_QMOPT_RES_INOS     0x0800000
 
-/*
- * flags for dqflush and dqflush_all.
- */
-#define XFS_QMOPT_SYNC         0x1000000
-#define XFS_QMOPT_DELWRI       0x4000000
-
 /*
  * flags for dqalloc.
  */
-#define XFS_QMOPT_INHERIT      0x8000000
+#define XFS_QMOPT_INHERIT      0x1000000
 
 /*
  * flags to xfs_trans_mod_dquot.