drm/msm: Make use of the helper component_compare_of
[linux-2.6-microblaze.git] / fs / xfs / xfs_icache.c
index 2e71872..9644f93 100644 (file)
@@ -1854,28 +1854,20 @@ xfs_inodegc_worker(
 }
 
 /*
- * Force all currently queued inode inactivation work to run immediately, and
- * wait for the work to finish. Two pass - queue all the work first pass, wait
- * for it in a second pass.
+ * Force all currently queued inode inactivation work to run immediately and
+ * wait for the work to finish.
  */
 void
 xfs_inodegc_flush(
        struct xfs_mount        *mp)
 {
-       struct xfs_inodegc      *gc;
-       int                     cpu;
-
        if (!xfs_is_inodegc_enabled(mp))
                return;
 
        trace_xfs_inodegc_flush(mp, __return_address);
 
        xfs_inodegc_queue_all(mp);
-
-       for_each_online_cpu(cpu) {
-               gc = per_cpu_ptr(mp->m_inodegc, cpu);
-               flush_work(&gc->work);
-       }
+       flush_workqueue(mp->m_inodegc_wq);
 }
 
 /*
@@ -1886,18 +1878,12 @@ void
 xfs_inodegc_stop(
        struct xfs_mount        *mp)
 {
-       struct xfs_inodegc      *gc;
-       int                     cpu;
-
        if (!xfs_clear_inodegc_enabled(mp))
                return;
 
        xfs_inodegc_queue_all(mp);
+       drain_workqueue(mp->m_inodegc_wq);
 
-       for_each_online_cpu(cpu) {
-               gc = per_cpu_ptr(mp->m_inodegc, cpu);
-               cancel_work_sync(&gc->work);
-       }
        trace_xfs_inodegc_stop(mp, __return_address);
 }