xfs: cancel eofblocks background trimming on remount read-only
[deliverable/linux.git] / fs / xfs / xfs_super.c
index 11ea5d51db56715cf2815dbda8ab3577ee0fd686..2d28108518710f1477ea3c2b7c387027c7f1b298 100644 (file)
@@ -1294,6 +1294,7 @@ xfs_fs_remount(
                 */
                xfs_restore_resvblks(mp);
                xfs_log_work_queue(mp);
+               xfs_queue_eofblocks(mp);
        }
 
        /* rw -> ro */
@@ -1306,6 +1307,13 @@ xfs_fs_remount(
                 * return it to the same size.
                 */
                xfs_save_resvblks(mp);
+
+               /*
+                * Cancel background eofb scanning so it cannot race with the
+                * final log force+buftarg wait and deadlock the remount.
+                */
+               cancel_delayed_work_sync(&mp->m_eofblocks_work);
+
                xfs_quiesce_attr(mp);
                mp->m_flags |= XFS_MOUNT_RDONLY;
        }
This page took 0.026638 seconds and 5 git commands to generate.