aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/client.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2009-07-21 16:48:07 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2009-07-21 16:48:07 -0400
commitfccba8045537f7e840d0e7565e1989d465e488a3 (patch)
tree89d80da7e017240e5a1d20c79501459c886fd007 /fs/nfs/client.c
parentb64aec8d1e1d8482a7b6cca60c8105c756bf1fe4 (diff)
downloadkernel_samsung_smdk4412-fccba8045537f7e840d0e7565e1989d465e488a3.tar.gz
kernel_samsung_smdk4412-fccba8045537f7e840d0e7565e1989d465e488a3.tar.bz2
kernel_samsung_smdk4412-fccba8045537f7e840d0e7565e1989d465e488a3.zip
NFSv4: Fix an NFSv4 mount regression
Commit 008f55d0e019943323c20a03493a2ba5672a4cc8 (nfs41: recover lease in _nfs4_lookup_root) forces the state manager to always run on mount. This is a bug in the case of NFSv4.0, which doesn't require us to send a setclientid until we want to grab file state. In any case, this is completely the wrong place to be doing state management. Moving that code into nfs4_init_session... Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/client.c')
-rw-r--r--fs/nfs/client.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/fs/nfs/client.c b/fs/nfs/client.c
index c2d061675d8..8d25ccb2d51 100644
--- a/fs/nfs/client.c
+++ b/fs/nfs/client.c
@@ -1242,20 +1242,6 @@ error:
return error;
}
-/*
- * Initialize a session.
- * Note: save the mount rsize and wsize for create_server negotiation.
- */
-static void nfs4_init_session(struct nfs_client *clp,
- unsigned int wsize, unsigned int rsize)
-{
-#if defined(CONFIG_NFS_V4_1)
- if (nfs4_has_session(clp)) {
- clp->cl_session->fc_attrs.max_rqst_sz = wsize;
- clp->cl_session->fc_attrs.max_resp_sz = rsize;
- }
-#endif /* CONFIG_NFS_V4_1 */
-}
/*
* Session has been established, and the client marked ready.
@@ -1350,7 +1336,9 @@ struct nfs_server *nfs4_create_server(const struct nfs_parsed_mount_data *data,
BUG_ON(!server->nfs_client->rpc_ops);
BUG_ON(!server->nfs_client->rpc_ops->file_inode_ops);
- nfs4_init_session(server->nfs_client, server->wsize, server->rsize);
+ error = nfs4_init_session(server);
+ if (error < 0)
+ goto error;
/* Probe the root fh to retrieve its FSID */
error = nfs4_path_walk(server, mntfh, data->nfs_server.export_path);