diff options
author | Trond Myklebust <trond.myklebust@hammerspace.com> | 2019-03-21 17:57:56 -0400 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@hammerspace.com> | 2019-03-23 12:03:58 -0400 |
commit | 5a698243930c441afccec04e4d5dc8febfd2b775 (patch) | |
tree | e0705f3f60caf51114fa0ae2b571fa2d80b0be86 /fs/nfs/client.c | |
parent | d84dd3fb82fa7a094de7f08f10610d55a70cf0ca (diff) |
NFS: Fix a typo in nfs_init_timeout_values()
Specifying a retrans=0 mount parameter to a NFS/TCP mount, is
inadvertently causing the NFS client to rewrite any specified
timeout parameter to the default of 60 seconds.
Fixes: a956beda19a6 ("NFS: Allow the mount option retrans=0")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'fs/nfs/client.c')
-rw-r--r-- | fs/nfs/client.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/client.c b/fs/nfs/client.c index fb1cf1a4bda2..90d71fda65ce 100644 --- a/fs/nfs/client.c +++ b/fs/nfs/client.c | |||
@@ -453,7 +453,7 @@ void nfs_init_timeout_values(struct rpc_timeout *to, int proto, | |||
453 | case XPRT_TRANSPORT_RDMA: | 453 | case XPRT_TRANSPORT_RDMA: |
454 | if (retrans == NFS_UNSPEC_RETRANS) | 454 | if (retrans == NFS_UNSPEC_RETRANS) |
455 | to->to_retries = NFS_DEF_TCP_RETRANS; | 455 | to->to_retries = NFS_DEF_TCP_RETRANS; |
456 | if (timeo == NFS_UNSPEC_TIMEO || to->to_retries == 0) | 456 | if (timeo == NFS_UNSPEC_TIMEO || to->to_initval == 0) |
457 | to->to_initval = NFS_DEF_TCP_TIMEO * HZ / 10; | 457 | to->to_initval = NFS_DEF_TCP_TIMEO * HZ / 10; |
458 | if (to->to_initval > NFS_MAX_TCP_TIMEOUT) | 458 | if (to->to_initval > NFS_MAX_TCP_TIMEOUT) |
459 | to->to_initval = NFS_MAX_TCP_TIMEOUT; | 459 | to->to_initval = NFS_MAX_TCP_TIMEOUT; |