aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2016-09-17 18:17:33 -0400
committerAnna Schumaker <Anna.Schumaker@Netapp.com>2016-09-22 13:56:04 -0400
commit66f570ab7307ad613b0d800fff27aba316014eaf (patch)
tree4ce0d4910a6be281554f0f91d46a51e3f79c475c /fs/nfs
parent75575ddf29cbbf8e3c96fb02ae80a33f22054aad (diff)
nfs: use safe, interruptible sleeps when waiting to retry LOCK
We actually want to use TASK_INTERRUPTIBLE sleeps when we're in the process of polling for a NFSv4 lock. If there is a signal pending when the task wakes up, then we'll be returning an error anyway. So, we might as well wake up immediately for non-fatal signals as well. That allows us to return to userland more quickly in that case, but won't change the error that userland sees. Also, there is no need to use the *_unsafe sleep variants here, as no vfs-layer locks should be held at this point. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/nfs4proc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index a84612e5979e..0aac0fbf0b58 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -5537,7 +5537,7 @@ int nfs4_proc_delegreturn(struct inode *inode, struct rpc_cred *cred, const nfs4
5537static unsigned long 5537static unsigned long
5538nfs4_set_lock_task_retry(unsigned long timeout) 5538nfs4_set_lock_task_retry(unsigned long timeout)
5539{ 5539{
5540 freezable_schedule_timeout_killable_unsafe(timeout); 5540 freezable_schedule_timeout_interruptible(timeout);
5541 timeout <<= 1; 5541 timeout <<= 1;
5542 if (timeout > NFS4_LOCK_MAXTIMEOUT) 5542 if (timeout > NFS4_LOCK_MAXTIMEOUT)
5543 return NFS4_LOCK_MAXTIMEOUT; 5543 return NFS4_LOCK_MAXTIMEOUT;