aboutsummaryrefslogtreecommitdiffstats
path: root/fs/lockd/mon.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2005-06-22 17:16:20 +0000
committerTrond Myklebust <Trond.Myklebust@netapp.com>2005-06-22 16:07:04 -0400
commit5ee0ed7d3ab620a764740fb018f469d45f561931 (patch)
tree9b6a938fe521815afd3cfb42e2023b443bb05d28 /fs/lockd/mon.c
parent5b616f5d596c0b056129f8aeafbc08409b3cd050 (diff)
downloadkernel_samsung_smdk4412-5ee0ed7d3ab620a764740fb018f469d45f561931.zip
kernel_samsung_smdk4412-5ee0ed7d3ab620a764740fb018f469d45f561931.tar.gz
kernel_samsung_smdk4412-5ee0ed7d3ab620a764740fb018f469d45f561931.tar.bz2
[PATCH] RPC: Make rpc_create_client() probe server for RPC program+version support
Ensure that we don't create an RPC client without checking that the server does indeed support the RPC program + version that we are trying to set up. This enables us to immediately return an error to "mount" if it turns out that the server is only supporting NFSv2, when we requested NFSv3 or NFSv4. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/lockd/mon.c')
-rw-r--r--fs/lockd/mon.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/lockd/mon.c b/fs/lockd/mon.c
index 81b5e77..2d144ab 100644
--- a/fs/lockd/mon.c
+++ b/fs/lockd/mon.c
@@ -115,6 +115,7 @@ nsm_create(void)
xprt = xprt_create_proto(IPPROTO_UDP, &sin, NULL);
if (IS_ERR(xprt))
return (struct rpc_clnt *)xprt;
+ xprt->resvport = 1; /* NSM requires a reserved port */
clnt = rpc_create_client(xprt, "localhost",
&nsm_program, SM_VERSION,
@@ -124,7 +125,6 @@ nsm_create(void)
clnt->cl_softrtry = 1;
clnt->cl_chatty = 1;
clnt->cl_oneshot = 1;
- xprt->resvport = 1; /* NSM requires a reserved port */
return clnt;
out_err: