summaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4proc.c
diff options
context:
space:
mode:
authorTrond Myklebust2016-08-06 01:13:08 +0200
committerTrond Myklebust2016-08-06 01:13:08 +0200
commitfb10fb67ad2ce43d5e5b8ad22d2ba826844acc56 (patch)
tree064464ced54bf3ba95a85fe2849fa15b94fe2cfc /fs/nfs/nfs4proc.c
parentSUNRPC: Limit the reconnect backoff timer to the max RPC message timeout (diff)
downloadkernel-qcow2-linux-fb10fb67ad2ce43d5e5b8ad22d2ba826844acc56.tar.gz
kernel-qcow2-linux-fb10fb67ad2ce43d5e5b8ad22d2ba826844acc56.tar.xz
kernel-qcow2-linux-fb10fb67ad2ce43d5e5b8ad22d2ba826844acc56.zip
NFSv4: Cleanup the setting of the nfs4 lease period
Make a helper function nfs4_set_lease_period() and have nfs41_setup_state_renewal() and nfs4_do_fsinfo() use it. Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'fs/nfs/nfs4proc.c')
-rw-r--r--fs/nfs/nfs4proc.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index da5c9e58e907..b9e18679af50 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -4237,12 +4237,9 @@ static int nfs4_do_fsinfo(struct nfs_server *server, struct nfs_fh *fhandle, str
err = _nfs4_do_fsinfo(server, fhandle, fsinfo);
trace_nfs4_fsinfo(server, fhandle, fsinfo->fattr, err);
if (err == 0) {
- struct nfs_client *clp = server->nfs_client;
-
- spin_lock(&clp->cl_lock);
- clp->cl_lease_time = fsinfo->lease_time * HZ;
- clp->cl_last_renewal = now;
- spin_unlock(&clp->cl_lock);
+ nfs4_set_lease_period(server->nfs_client,
+ fsinfo->lease_time * HZ,
+ now);
break;
}
err = nfs4_handle_exception(server, err, &exception);