{
        int                     error, error2 = 0;
  
-       xfs_qm_sync(mp, SYNC_TRYLOCK);
-       xfs_qm_sync(mp, SYNC_WAIT);
- 
-       /* force out the newly dirtied log buffers */
 +      /*
 +       * Log all pending size and timestamp updates.  The vfs writeback
 +       * code is supposed to do this, but due to its overagressive
 +       * livelock detection it will skip inodes where appending writes
 +       * were written out in the first non-blocking sync phase if their
 +       * completion took long enough that it happened after taking the
 +       * timestamp for the cut-off in the blocking phase.
 +       */
 +      xfs_inode_ag_iterator(mp, xfs_log_dirty_inode, 0);
 +
+       /* force out the log */
        xfs_log_force(mp, XFS_LOG_SYNC);
  
        /* write superblock and hoover up shutdown errors */