diff options
author | Jeff Layton <jlayton@redhat.com> | 2011-12-01 16:44:39 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rjw@sisk.pl> | 2011-12-06 16:12:27 -0500 |
commit | d310310cbff18ec385c6ab4d58f33b100192a96a (patch) | |
tree | 801dbbef1552256e7cefc7ec08dcd41b30a9930b /fs/nfs/inode.c | |
parent | 62c9ea6b120688d800b4d892eaf737c20a73e86b (diff) |
Freezer / sunrpc / NFS: don't allow TASK_KILLABLE sleeps to block the freezer
Allow the freezer to skip wait_on_bit_killable sleeps in the sunrpc
layer. This should allow suspend and hibernate events to proceed, even
when there are RPC's pending on the wire.
Also, wrap the TASK_KILLABLE sleeps in NFS layer in freezer_do_not_count
and freezer_count calls. This allows the freezer to skip tasks that are
sleeping while looping on EJUKEBOX or NFS4ERR_DELAY sorts of errors.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Diffstat (limited to 'fs/nfs/inode.c')
-rw-r--r-- | fs/nfs/inode.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index 50a15fa8cf98..bf3a57bbbfcf 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <linux/nfs_xdr.h> | 38 | #include <linux/nfs_xdr.h> |
39 | #include <linux/slab.h> | 39 | #include <linux/slab.h> |
40 | #include <linux/compat.h> | 40 | #include <linux/compat.h> |
41 | #include <linux/freezer.h> | ||
41 | 42 | ||
42 | #include <asm/system.h> | 43 | #include <asm/system.h> |
43 | #include <asm/uaccess.h> | 44 | #include <asm/uaccess.h> |
@@ -77,7 +78,7 @@ int nfs_wait_bit_killable(void *word) | |||
77 | { | 78 | { |
78 | if (fatal_signal_pending(current)) | 79 | if (fatal_signal_pending(current)) |
79 | return -ERESTARTSYS; | 80 | return -ERESTARTSYS; |
80 | schedule(); | 81 | freezable_schedule(); |
81 | return 0; | 82 | return 0; |
82 | } | 83 | } |
83 | 84 | ||