summaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4renewd.c
diff options
context:
space:
mode:
authorTrond Myklebust2017-02-08 17:17:55 +0100
committerAnna Schumaker2017-02-09 20:15:16 +0100
commit26ae102f2cfd0215daa57dc790aa3bfe534403a9 (patch)
treece13f4d3a76929211161d40eb5d180252a99096a /fs/nfs/nfs4renewd.c
parentSUNRPC: Allow changing of the TCP timeout parameters on the fly (diff)
downloadkernel-qcow2-linux-26ae102f2cfd0215daa57dc790aa3bfe534403a9.tar.gz
kernel-qcow2-linux-26ae102f2cfd0215daa57dc790aa3bfe534403a9.tar.xz
kernel-qcow2-linux-26ae102f2cfd0215daa57dc790aa3bfe534403a9.zip
NFSv4: Set the connection timeout to match the lease period
Set the timeout for TCP connections to be 1 lease period to ensure that we don't lose our lease due to a faulty TCP connection. Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'fs/nfs/nfs4renewd.c')
-rw-r--r--fs/nfs/nfs4renewd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/nfs4renewd.c b/fs/nfs/nfs4renewd.c
index 82e77198d17e..1f8c2ae43a8d 100644
--- a/fs/nfs/nfs4renewd.c
+++ b/fs/nfs/nfs4renewd.c
@@ -153,7 +153,7 @@ void nfs4_set_lease_period(struct nfs_client *clp,
spin_unlock(&clp->cl_lock);
/* Cap maximum reconnect timeout at 1/2 lease period */
- rpc_cap_max_reconnect_timeout(clp->cl_rpcclient, lease >> 1);
+ rpc_set_connect_timeout(clp->cl_rpcclient, lease, lease >> 1);
}
/*