From: Todd Poynor Date: Wed, 24 Aug 2011 22:01:30 +0000 (-0700) Subject: fuse: Freeze client on suspend when request sent to userspace X-Git-Tag: firefly_0821_release~7613^2~337 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=b44e592cd883d16bb12e9d0fcd31fdb2b17d05c1;p=firefly-linux-kernel-4.4.55.git fuse: Freeze client on suspend when request sent to userspace Suspend attempts can abort when the FUSE daemon is already frozen and a client is waiting uninterruptibly for a response, causing freezing of tasks to fail. Use the freeze-friendly wait API, but disregard other signals. Change-Id: Icefb7e4bbc718ccb76bf3c04daaa5eeea7e0e63c Signed-off-by: Todd Poynor --- diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c index 640fc229df10..99e13346a752 100644 --- a/fs/fuse/dev.c +++ b/fs/fuse/dev.c @@ -19,6 +19,7 @@ #include #include #include +#include MODULE_ALIAS_MISCDEV(FUSE_MINOR); MODULE_ALIAS("devname:fuse"); @@ -383,7 +384,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)