aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4proc.c
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2011-12-01 16:44:39 -0500
committerRafael J. Wysocki <rjw@sisk.pl>2011-12-06 16:12:27 -0500
commitd310310cbff18ec385c6ab4d58f33b100192a96a (patch)
tree801dbbef1552256e7cefc7ec08dcd41b30a9930b /fs/nfs/nfs4proc.c
parent62c9ea6b120688d800b4d892eaf737c20a73e86b (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/nfs4proc.c')
-rw-r--r--fs/nfs/nfs4proc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index be2bbac13817..b28bb19b04f0 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -53,6 +53,7 @@
53#include <linux/sunrpc/bc_xprt.h> 53#include <linux/sunrpc/bc_xprt.h>
54#include <linux/xattr.h> 54#include <linux/xattr.h>
55#include <linux/utsname.h> 55#include <linux/utsname.h>
56#include <linux/freezer.h>
56 57
57#include "nfs4_fs.h" 58#include "nfs4_fs.h"
58#include "delegation.h" 59#include "delegation.h"
@@ -241,7 +242,7 @@ static int nfs4_delay(struct rpc_clnt *clnt, long *timeout)
241 *timeout = NFS4_POLL_RETRY_MIN; 242 *timeout = NFS4_POLL_RETRY_MIN;
242 if (*timeout > NFS4_POLL_RETRY_MAX) 243 if (*timeout > NFS4_POLL_RETRY_MAX)
243 *timeout = NFS4_POLL_RETRY_MAX; 244 *timeout = NFS4_POLL_RETRY_MAX;
244 schedule_timeout_killable(*timeout); 245 freezable_schedule_timeout_killable(*timeout);
245 if (fatal_signal_pending(current)) 246 if (fatal_signal_pending(current))
246 res = -ERESTARTSYS; 247 res = -ERESTARTSYS;
247 *timeout <<= 1; 248 *timeout <<= 1;
@@ -3950,7 +3951,7 @@ int nfs4_proc_delegreturn(struct inode *inode, struct rpc_cred *cred, const nfs4
3950static unsigned long 3951static unsigned long
3951nfs4_set_lock_task_retry(unsigned long timeout) 3952nfs4_set_lock_task_retry(unsigned long timeout)
3952{ 3953{
3953 schedule_timeout_killable(timeout); 3954 freezable_schedule_timeout_killable(timeout);
3954 timeout <<= 1; 3955 timeout <<= 1;
3955 if (timeout > NFS4_LOCK_MAXTIMEOUT) 3956 if (timeout > NFS4_LOCK_MAXTIMEOUT)
3956 return NFS4_LOCK_MAXTIMEOUT; 3957 return NFS4_LOCK_MAXTIMEOUT;