aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/client.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfs/client.c')
-rw-r--r--fs/nfs/client.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/fs/nfs/client.c b/fs/nfs/client.c
index ae9f36e393cf..2190e6c2792e 100644
--- a/fs/nfs/client.c
+++ b/fs/nfs/client.c
@@ -394,7 +394,8 @@ static void nfs_init_timeout_values(struct rpc_timeout *to, int proto,
394static int nfs_create_rpc_client(struct nfs_client *clp, int proto, 394static int nfs_create_rpc_client(struct nfs_client *clp, int proto,
395 unsigned int timeo, 395 unsigned int timeo,
396 unsigned int retrans, 396 unsigned int retrans,
397 rpc_authflavor_t flavor) 397 rpc_authflavor_t flavor,
398 int flags)
398{ 399{
399 struct rpc_timeout timeparms; 400 struct rpc_timeout timeparms;
400 struct rpc_clnt *clnt = NULL; 401 struct rpc_clnt *clnt = NULL;
@@ -407,6 +408,7 @@ static int nfs_create_rpc_client(struct nfs_client *clp, int proto,
407 .program = &nfs_program, 408 .program = &nfs_program,
408 .version = clp->rpc_ops->version, 409 .version = clp->rpc_ops->version,
409 .authflavor = flavor, 410 .authflavor = flavor,
411 .flags = flags,
410 }; 412 };
411 413
412 if (!IS_ERR(clp->cl_rpcclient)) 414 if (!IS_ERR(clp->cl_rpcclient))
@@ -548,7 +550,7 @@ static int nfs_init_client(struct nfs_client *clp, const struct nfs_mount_data *
548 * - RFC 2623, sec 2.3.2 550 * - RFC 2623, sec 2.3.2
549 */ 551 */
550 error = nfs_create_rpc_client(clp, proto, data->timeo, data->retrans, 552 error = nfs_create_rpc_client(clp, proto, data->timeo, data->retrans,
551 RPC_AUTH_UNIX); 553 RPC_AUTH_UNIX, 0);
552 if (error < 0) 554 if (error < 0)
553 goto error; 555 goto error;
554 nfs_mark_client_ready(clp, NFS_CS_READY); 556 nfs_mark_client_ready(clp, NFS_CS_READY);
@@ -868,7 +870,8 @@ static int nfs4_init_client(struct nfs_client *clp,
868 /* Check NFS protocol revision and initialize RPC op vector */ 870 /* Check NFS protocol revision and initialize RPC op vector */
869 clp->rpc_ops = &nfs_v4_clientops; 871 clp->rpc_ops = &nfs_v4_clientops;
870 872
871 error = nfs_create_rpc_client(clp, proto, timeo, retrans, authflavour); 873 error = nfs_create_rpc_client(clp, proto, timeo, retrans, authflavour,
874 RPC_CLNT_CREATE_DISCRTRY);
872 if (error < 0) 875 if (error < 0)
873 goto error; 876 goto error;
874 memcpy(clp->cl_ipaddr, ip_addr, sizeof(clp->cl_ipaddr)); 877 memcpy(clp->cl_ipaddr, ip_addr, sizeof(clp->cl_ipaddr));
@@ -1030,7 +1033,7 @@ error:
1030 * Create an NFS4 referral server record 1033 * Create an NFS4 referral server record
1031 */ 1034 */
1032struct nfs_server *nfs4_create_referral_server(struct nfs_clone_mount *data, 1035struct nfs_server *nfs4_create_referral_server(struct nfs_clone_mount *data,
1033 struct nfs_fh *fh) 1036 struct nfs_fh *mntfh)
1034{ 1037{
1035 struct nfs_client *parent_client; 1038 struct nfs_client *parent_client;
1036 struct nfs_server *server, *parent_server; 1039 struct nfs_server *server, *parent_server;
@@ -1069,8 +1072,13 @@ struct nfs_server *nfs4_create_referral_server(struct nfs_clone_mount *data,
1069 BUG_ON(!server->nfs_client->rpc_ops); 1072 BUG_ON(!server->nfs_client->rpc_ops);
1070 BUG_ON(!server->nfs_client->rpc_ops->file_inode_ops); 1073 BUG_ON(!server->nfs_client->rpc_ops->file_inode_ops);
1071 1074
1075 /* Probe the root fh to retrieve its FSID and filehandle */
1076 error = nfs4_path_walk(server, mntfh, data->mnt_path);
1077 if (error < 0)
1078 goto error;
1079
1072 /* probe the filesystem info for this server filesystem */ 1080 /* probe the filesystem info for this server filesystem */
1073 error = nfs_probe_fsinfo(server, fh, &fattr); 1081 error = nfs_probe_fsinfo(server, mntfh, &fattr);
1074 if (error < 0) 1082 if (error < 0)
1075 goto error; 1083 goto error;
1076 1084