From 0f009f651acca93f3e672c081fc67598741cf81b Mon Sep 17 00:00:00 2001 From: Trond Myklebust Date: Thu, 20 Dec 2007 16:03:57 -0500 Subject: [PATCH] --- yaml --- r: 79650 b: refs/heads/master c: 7a3e3e18e40848b6f01d44407ce86b91b8535fbd h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/nfs/client.c | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 0351ed86ae15..0efc0066fc87 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: ba7392bb37cb12781890f45d7ddee1618e33a036 +refs/heads/master: 7a3e3e18e40848b6f01d44407ce86b91b8535fbd diff --git a/trunk/fs/nfs/client.c b/trunk/fs/nfs/client.c index 906613362a56..59a6dccab548 100644 --- a/trunk/fs/nfs/client.c +++ b/trunk/fs/nfs/client.c @@ -387,12 +387,16 @@ static void nfs_init_timeout_values(struct rpc_timeout *to, int proto, switch (proto) { case XPRT_TRANSPORT_TCP: case XPRT_TRANSPORT_RDMA: - if (!to->to_initval) + if (to->to_initval == 0) to->to_initval = 60 * HZ; if (to->to_initval > NFS_MAX_TCP_TIMEOUT) to->to_initval = NFS_MAX_TCP_TIMEOUT; to->to_increment = to->to_initval; to->to_maxval = to->to_initval + (to->to_increment * to->to_retries); + if (to->to_maxval > NFS_MAX_TCP_TIMEOUT) + to->to_maxval = NFS_MAX_TCP_TIMEOUT; + if (to->to_maxval < to->to_initval) + to->to_maxval = to->to_initval; to->to_exponential = 0; break; case XPRT_TRANSPORT_UDP: