aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4proc.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfs/nfs4proc.c')
-rw-r--r--fs/nfs/nfs4proc.c24
1 files changed, 17 insertions, 7 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index ff0c080db59b..df24f67bca69 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -2040,15 +2040,9 @@ static int _nfs4_lookup_root(struct nfs_server *server, struct nfs_fh *fhandle,
2040 .rpc_argp = &args, 2040 .rpc_argp = &args,
2041 .rpc_resp = &res, 2041 .rpc_resp = &res,
2042 }; 2042 };
2043 int status;
2044 2043
2045 nfs_fattr_init(info->fattr); 2044 nfs_fattr_init(info->fattr);
2046 status = nfs4_recover_expired_lease(server); 2045 return nfs4_call_sync(server, &msg, &args, &res, 0);
2047 if (!status)
2048 status = nfs4_check_client_ready(server->nfs_client);
2049 if (!status)
2050 status = nfs4_call_sync(server, &msg, &args, &res, 0);
2051 return status;
2052} 2046}
2053 2047
2054static int nfs4_lookup_root(struct nfs_server *server, struct nfs_fh *fhandle, 2048static int nfs4_lookup_root(struct nfs_server *server, struct nfs_fh *fhandle,
@@ -4793,6 +4787,22 @@ int nfs4_proc_destroy_session(struct nfs4_session *session)
4793 return status; 4787 return status;
4794} 4788}
4795 4789
4790int nfs4_init_session(struct nfs_server *server)
4791{
4792 struct nfs_client *clp = server->nfs_client;
4793 int ret;
4794
4795 if (!nfs4_has_session(clp))
4796 return 0;
4797
4798 clp->cl_session->fc_attrs.max_rqst_sz = server->wsize;
4799 clp->cl_session->fc_attrs.max_resp_sz = server->rsize;
4800 ret = nfs4_recover_expired_lease(server);
4801 if (!ret)
4802 ret = nfs4_check_client_ready(clp);
4803 return ret;
4804}
4805
4796/* 4806/*
4797 * Renew the cl_session lease. 4807 * Renew the cl_session lease.
4798 */ 4808 */