freezer: implement and use kthread_freezable_should_stop()
[linux-2.6-block.git] / fs / fs-writeback.c
index 73c3992b2bb4aa765d3dc2418e907ca0a7ba78f2..271fde50f0ee9735b94f60a93bb15361e5997d2c 100644 (file)
@@ -947,7 +947,7 @@ int bdi_writeback_thread(void *data)
 
        trace_writeback_thread_start(bdi);
 
-       while (!kthread_should_stop()) {
+       while (!kthread_freezable_should_stop(NULL)) {
                /*
                 * Remove own delayed wake-up timer, since we are already awake
                 * and we'll take care of the preriodic write-back.
@@ -977,8 +977,6 @@ int bdi_writeback_thread(void *data)
                         */
                        schedule();
                }
-
-               try_to_freeze();
        }
 
        /* Flush any work that raced with us exiting */