workqueue: deprecate flush[_delayed]_work_sync()
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / fs / xfs / xfs_sync.c
index 1e9ee064dbb28c7cb491d4c41dce53007eebc7e9..9500caf15acf6c355cde32cb0e692a3a58a6a990 100644 (file)
@@ -359,6 +359,15 @@ xfs_quiesce_attr(
         * added an item to the AIL, thus flush it again.
         */
        xfs_ail_push_all_sync(mp->m_ail);
+
+       /*
+        * The superblock buffer is uncached and xfsaild_push() will lock and
+        * set the XBF_ASYNC flag on the buffer. We cannot do xfs_buf_iowait()
+        * here but a lock on the superblock buffer will block until iodone()
+        * has completed.
+        */
+       xfs_buf_lock(mp->m_sb_bp);
+       xfs_buf_unlock(mp->m_sb_bp);
 }
 
 static void
@@ -394,7 +403,7 @@ xfs_sync_worker(
        if (!(mp->m_super->s_flags & MS_ACTIVE) &&
            !(mp->m_flags & XFS_MOUNT_RDONLY)) {
                /* dgc: errors ignored here */
-               if (mp->m_super->s_frozen == SB_UNFROZEN &&
+               if (mp->m_super->s_writers.frozen == SB_UNFROZEN &&
                    xfs_log_need_covered(mp))
                        error = xfs_fs_log_dummy(mp);
                else
@@ -466,7 +475,7 @@ xfs_flush_inodes(
        struct xfs_mount        *mp = ip->i_mount;
 
        queue_work(xfs_syncd_wq, &mp->m_flush_work);
-       flush_work_sync(&mp->m_flush_work);
+       flush_work(&mp->m_flush_work);
 }
 
 STATIC void
@@ -712,8 +721,8 @@ restart:
         * Note that xfs_iflush will never block on the inode buffer lock, as
         * xfs_ifree_cluster() can lock the inode buffer before it locks the
         * ip->i_lock, and we are doing the exact opposite here.  As a result,
-        * doing a blocking xfs_itobp() to get the cluster buffer would result
-        * in an ABBA deadlock with xfs_ifree_cluster().
+        * doing a blocking xfs_imap_to_bp() to get the cluster buffer would
+        * result in an ABBA deadlock with xfs_ifree_cluster().
         *
         * As xfs_ifree_cluser() must gather all inodes that are active in the
         * cache to mark them stale, if we hit this case we don't actually want