From 0749d8b4a3e2ba64f43363c051ca3386fd94587f Mon Sep 17 00:00:00 2001 From: Chuck Lever Date: Tue, 23 Dec 2008 15:21:35 -0500 Subject: [PATCH] --- yaml --- r: 124711 b: refs/heads/master c: 4a01b8a4ee7b12becd26a49bae57f019605658cd h: refs/heads/master i: 124709: 502ee6dffd8ca917c9dd866119d692aa4ed942d7 124707: e1173df4191b26d21594b29fe4fde9d8fa309195 124703: c0e1b46948cedf7cc2cada062a05eb3802f2f68d v: v3 --- [refs] | 2 +- trunk/fs/nfs/client.c | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 286e970cc4ab..3f5f0aaffae1 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: c5d120f8e8b464368a7dcb038dc5c077d234d10a +refs/heads/master: 4a01b8a4ee7b12becd26a49bae57f019605658cd diff --git a/trunk/fs/nfs/client.c b/trunk/fs/nfs/client.c index 7547600b6174..d11cdaafb39a 100644 --- a/trunk/fs/nfs/client.c +++ b/trunk/fs/nfs/client.c @@ -470,7 +470,7 @@ static void nfs_init_timeout_values(struct rpc_timeout *to, int proto, static int nfs_create_rpc_client(struct nfs_client *clp, const struct rpc_timeout *timeparms, rpc_authflavor_t flavor, - int flags) + int discrtry, int noresvport) { struct rpc_clnt *clnt = NULL; struct rpc_create_args args = { @@ -482,9 +482,13 @@ static int nfs_create_rpc_client(struct nfs_client *clp, .program = &nfs_program, .version = clp->rpc_ops->version, .authflavor = flavor, - .flags = flags, }; + if (discrtry) + args.flags |= RPC_CLNT_CREATE_DISCRTRY; + if (noresvport) + args.flags |= RPC_CLNT_CREATE_NONPRIVPORT; + if (!IS_ERR(clp->cl_rpcclient)) return 0; @@ -623,7 +627,7 @@ static int nfs_init_client(struct nfs_client *clp, * Create a client RPC handle for doing FSSTAT with UNIX auth only * - RFC 2623, sec 2.3.2 */ - error = nfs_create_rpc_client(clp, timeparms, RPC_AUTH_UNIX, 0); + error = nfs_create_rpc_client(clp, timeparms, RPC_AUTH_UNIX, 0, 0); if (error < 0) goto error; nfs_mark_client_ready(clp, NFS_CS_READY); @@ -979,7 +983,7 @@ static int nfs4_init_client(struct nfs_client *clp, clp->rpc_ops = &nfs_v4_clientops; error = nfs_create_rpc_client(clp, timeparms, authflavour, - RPC_CLNT_CREATE_DISCRTRY); + 1, 0); if (error < 0) goto error; memcpy(clp->cl_ipaddr, ip_addr, sizeof(clp->cl_ipaddr));