diff options
| author | Todd Poynor <toddpoynor@google.com> | 2011-08-24 15:01:30 -0700 |
|---|---|---|
| committer | Colin Cross <ccross@android.com> | 2012-04-09 13:57:58 -0700 |
| commit | d893d660b72ba0e524e6e67331fb595b79f96aa7 (patch) | |
| tree | 3ca7f50e3224dd0d47404ebb39509e2307a2c16b | |
| parent | 73f1329d135147aacf26013f64a4c30145bc0520 (diff) | |
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 <toddpoynor@google.com>
| -rw-r--r-- | fs/fuse/dev.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c index 7df2b5e8fbe..ceb3b29c8cd 100644 --- a/fs/fuse/dev.c +++ b/fs/fuse/dev.c @@ -19,6 +19,7 @@ #include <linux/pipe_fs_i.h> #include <linux/swap.h> #include <linux/splice.h> +#include <linux/freezer.h> MODULE_ALIAS_MISCDEV(FUSE_MINOR); MODULE_ALIAS("devname:fuse"); @@ -387,7 +388,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) |
