diff options
Diffstat (limited to 'fs/nfs')
-rw-r--r-- | fs/nfs/client.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/fs/nfs/client.c b/fs/nfs/client.c index 7547600b6174..d11cdaafb39a 100644 --- a/fs/nfs/client.c +++ b/fs/nfs/client.c | |||
@@ -470,7 +470,7 @@ static void nfs_init_timeout_values(struct rpc_timeout *to, int proto, | |||
470 | static int nfs_create_rpc_client(struct nfs_client *clp, | 470 | static int nfs_create_rpc_client(struct nfs_client *clp, |
471 | const struct rpc_timeout *timeparms, | 471 | const struct rpc_timeout *timeparms, |
472 | rpc_authflavor_t flavor, | 472 | rpc_authflavor_t flavor, |
473 | int flags) | 473 | int discrtry, int noresvport) |
474 | { | 474 | { |
475 | struct rpc_clnt *clnt = NULL; | 475 | struct rpc_clnt *clnt = NULL; |
476 | struct rpc_create_args args = { | 476 | struct rpc_create_args args = { |
@@ -482,9 +482,13 @@ static int nfs_create_rpc_client(struct nfs_client *clp, | |||
482 | .program = &nfs_program, | 482 | .program = &nfs_program, |
483 | .version = clp->rpc_ops->version, | 483 | .version = clp->rpc_ops->version, |
484 | .authflavor = flavor, | 484 | .authflavor = flavor, |
485 | .flags = flags, | ||
486 | }; | 485 | }; |
487 | 486 | ||
487 | if (discrtry) | ||
488 | args.flags |= RPC_CLNT_CREATE_DISCRTRY; | ||
489 | if (noresvport) | ||
490 | args.flags |= RPC_CLNT_CREATE_NONPRIVPORT; | ||
491 | |||
488 | if (!IS_ERR(clp->cl_rpcclient)) | 492 | if (!IS_ERR(clp->cl_rpcclient)) |
489 | return 0; | 493 | return 0; |
490 | 494 | ||
@@ -623,7 +627,7 @@ static int nfs_init_client(struct nfs_client *clp, | |||
623 | * 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 |
624 | * - RFC 2623, sec 2.3.2 | 628 | * - RFC 2623, sec 2.3.2 |
625 | */ | 629 | */ |
626 | error = nfs_create_rpc_client(clp, timeparms, RPC_AUTH_UNIX, 0); | 630 | error = nfs_create_rpc_client(clp, timeparms, RPC_AUTH_UNIX, 0, 0); |
627 | if (error < 0) | 631 | if (error < 0) |
628 | goto error; | 632 | goto error; |
629 | nfs_mark_client_ready(clp, NFS_CS_READY); | 633 | nfs_mark_client_ready(clp, NFS_CS_READY); |
@@ -979,7 +983,7 @@ static int nfs4_init_client(struct nfs_client *clp, | |||
979 | clp->rpc_ops = &nfs_v4_clientops; | 983 | clp->rpc_ops = &nfs_v4_clientops; |
980 | 984 | ||
981 | error = nfs_create_rpc_client(clp, timeparms, authflavour, | 985 | error = nfs_create_rpc_client(clp, timeparms, authflavour, |
982 | RPC_CLNT_CREATE_DISCRTRY); | 986 | 1, 0); |
983 | if (error < 0) | 987 | if (error < 0) |
984 | goto error; | 988 | goto error; |
985 | memcpy(clp->cl_ipaddr, ip_addr, sizeof(clp->cl_ipaddr)); | 989 | memcpy(clp->cl_ipaddr, ip_addr, sizeof(clp->cl_ipaddr)); |