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.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/fs/nfs/client.c b/fs/nfs/client.c
index 27190337fc13..3a69cacc4fa4 100644
--- a/fs/nfs/client.c
+++ b/fs/nfs/client.c
@@ -627,7 +627,8 @@ static int nfs_init_client(struct nfs_client *clp,
627 * Create a client RPC handle for doing FSSTAT with UNIX auth only 627 * Create a client RPC handle for doing FSSTAT with UNIX auth only
628 * - RFC 2623, sec 2.3.2 628 * - RFC 2623, sec 2.3.2
629 */ 629 */
630 error = nfs_create_rpc_client(clp, timeparms, RPC_AUTH_UNIX, 0, 0); 630 error = nfs_create_rpc_client(clp, timeparms, RPC_AUTH_UNIX,
631 0, data->flags & NFS_MOUNT_NORESVPORT);
631 if (error < 0) 632 if (error < 0)
632 goto error; 633 goto error;
633 nfs_mark_client_ready(clp, NFS_CS_READY); 634 nfs_mark_client_ready(clp, NFS_CS_READY);
@@ -969,7 +970,8 @@ error:
969static int nfs4_init_client(struct nfs_client *clp, 970static int nfs4_init_client(struct nfs_client *clp,
970 const struct rpc_timeout *timeparms, 971 const struct rpc_timeout *timeparms,
971 const char *ip_addr, 972 const char *ip_addr,
972 rpc_authflavor_t authflavour) 973 rpc_authflavor_t authflavour,
974 int flags)
973{ 975{
974 int error; 976 int error;
975 977
@@ -983,7 +985,7 @@ static int nfs4_init_client(struct nfs_client *clp,
983 clp->rpc_ops = &nfs_v4_clientops; 985 clp->rpc_ops = &nfs_v4_clientops;
984 986
985 error = nfs_create_rpc_client(clp, timeparms, authflavour, 987 error = nfs_create_rpc_client(clp, timeparms, authflavour,
986 1, 0); 988 1, flags & NFS_MOUNT_NORESVPORT);
987 if (error < 0) 989 if (error < 0)
988 goto error; 990 goto error;
989 memcpy(clp->cl_ipaddr, ip_addr, sizeof(clp->cl_ipaddr)); 991 memcpy(clp->cl_ipaddr, ip_addr, sizeof(clp->cl_ipaddr));
@@ -1034,7 +1036,8 @@ static int nfs4_set_client(struct nfs_server *server,
1034 error = PTR_ERR(clp); 1036 error = PTR_ERR(clp);
1035 goto error; 1037 goto error;
1036 } 1038 }
1037 error = nfs4_init_client(clp, timeparms, ip_addr, authflavour); 1039 error = nfs4_init_client(clp, timeparms, ip_addr, authflavour,
1040 server->flags);
1038 if (error < 0) 1041 if (error < 0)
1039 goto error_put; 1042 goto error_put;
1040 1043