Merge branch 'linux-linaro-lsk' into linux-linaro-lsk-android
[firefly-linux-kernel-4.4.55.git] / fs / fuse / dev.c
index 1d55f94654000dbc8e8c0de37e0cb32471e3791a..0e16fc1cfcd32e72b849d0c034324b9937320eb0 100644 (file)
@@ -20,6 +20,7 @@
 #include <linux/swap.h>
 #include <linux/splice.h>
 #include <linux/aio.h>
+#include <linux/freezer.h>
 
 MODULE_ALIAS_MISCDEV(FUSE_MINOR);
 MODULE_ALIAS("devname:fuse");
@@ -464,7 +465,10 @@ __acquires(fc->lock)
         * Wait it out.
         */
        spin_unlock(&fc->lock);
-       wait_event(req->waitq, req->state == FUSE_REQ_FINISHED);
+
+       while (req->state != FUSE_REQ_FINISHED)
+               wait_event_freezable(req->waitq,
+                                    req->state == FUSE_REQ_FINISHED);
        spin_lock(&fc->lock);
 
        if (!req->aborted)