aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/client.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfs/client.c')
-rw-r--r--fs/nfs/client.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/nfs/client.c b/fs/nfs/client.c
index 906613362a56..59a6dccab548 100644
--- a/fs/nfs/client.c
+++ b/fs/nfs/client.c
@@ -387,12 +387,16 @@ static void nfs_init_timeout_values(struct rpc_timeout *to, int proto,
387 switch (proto) { 387 switch (proto) {
388 case XPRT_TRANSPORT_TCP: 388 case XPRT_TRANSPORT_TCP:
389 case XPRT_TRANSPORT_RDMA: 389 case XPRT_TRANSPORT_RDMA:
390 if (!to->to_initval) 390 if (to->to_initval == 0)
391 to->to_initval = 60 * HZ; 391 to->to_initval = 60 * HZ;
392 if (to->to_initval > NFS_MAX_TCP_TIMEOUT) 392 if (to->to_initval > NFS_MAX_TCP_TIMEOUT)
393 to->to_initval = NFS_MAX_TCP_TIMEOUT; 393 to->to_initval = NFS_MAX_TCP_TIMEOUT;
394 to->to_increment = to->to_initval; 394 to->to_increment = to->to_initval;
395 to->to_maxval = to->to_initval + (to->to_increment * to->to_retries); 395 to->to_maxval = to->to_initval + (to->to_increment * to->to_retries);
396 if (to->to_maxval > NFS_MAX_TCP_TIMEOUT)
397 to->to_maxval = NFS_MAX_TCP_TIMEOUT;
398 if (to->to_maxval < to->to_initval)
399 to->to_maxval = to->to_initval;
396 to->to_exponential = 0; 400 to->to_exponential = 0;
397 break; 401 break;
398 case XPRT_TRANSPORT_UDP: 402 case XPRT_TRANSPORT_UDP: