diff options
author | Trond Myklebust <trond.myklebust@hammerspace.com> | 2019-03-21 17:57:56 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-05-04 09:20:18 +0200 |
commit | b989a3e9d260e2b567f5ae501fdf445f626911c1 (patch) | |
tree | d29855aba8464c6affed754de6b6348d84bfbd82 /fs | |
parent | e0c34051669ce347fc973224a97b9b7432d5a87f (diff) | |
download | linux-stable-b989a3e9d260e2b567f5ae501fdf445f626911c1.tar.gz linux-stable-b989a3e9d260e2b567f5ae501fdf445f626911c1.tar.bz2 linux-stable-b989a3e9d260e2b567f5ae501fdf445f626911c1.zip |
NFS: Fix a typo in nfs_init_timeout_values()
[ Upstream commit 5a698243930c441afccec04e4d5dc8febfd2b775 ]
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>
Signed-off-by: Sasha Levin (Microsoft) <sashal@kernel.org>
Diffstat (limited to 'fs')
-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 96d5f8135eb9..751ca65da8a3 100644 --- a/fs/nfs/client.c +++ b/fs/nfs/client.c @@ -459,7 +459,7 @@ void nfs_init_timeout_values(struct rpc_timeout *to, int proto, case XPRT_TRANSPORT_RDMA: if (retrans == NFS_UNSPEC_RETRANS) to->to_retries = NFS_DEF_TCP_RETRANS; - if (timeo == NFS_UNSPEC_TIMEO || to->to_retries == 0) + if (timeo == NFS_UNSPEC_TIMEO || to->to_initval == 0) to->to_initval = NFS_DEF_TCP_TIMEO * HZ / 10; if (to->to_initval > NFS_MAX_TCP_TIMEOUT) to->to_initval = NFS_MAX_TCP_TIMEOUT; |