aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2006-08-27 17:23:53 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2006-09-22 23:24:55 -0400
commit058ad9cbf14b3c7480d01b20280cb4d5858f7a50 (patch)
tree069a2340c25a953b134b09efc9b84e64847b93ec
parent6daabf1b04c89f1fbd8eab5450261360943c8e20 (diff)
NFS: NFS_ROOT should use the new rpc_create API
Teach NFS_ROOT to use the new rpc_create API instead of the old two-call API for creating an RPC transport. Test plan: Compile the kernel with the NFS client build-in, and set CONFIG_NFS_ROOT. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
-rw-r--r--fs/nfs/mount_clnt.c29
1 files changed, 13 insertions, 16 deletions
diff --git a/fs/nfs/mount_clnt.c b/fs/nfs/mount_clnt.c
index 41274874b9a5..d507b021207f 100644
--- a/fs/nfs/mount_clnt.c
+++ b/fs/nfs/mount_clnt.c
@@ -76,22 +76,19 @@ static struct rpc_clnt *
76mnt_create(char *hostname, struct sockaddr_in *srvaddr, int version, 76mnt_create(char *hostname, struct sockaddr_in *srvaddr, int version,
77 int protocol) 77 int protocol)
78{ 78{
79 struct rpc_xprt *xprt; 79 struct rpc_create_args args = {
80 struct rpc_clnt *clnt; 80 .protocol = protocol,
81 81 .address = (struct sockaddr *)srvaddr,
82 xprt = xprt_create_proto(protocol, srvaddr, NULL); 82 .addrsize = sizeof(*srvaddr),
83 if (IS_ERR(xprt)) 83 .servername = hostname,
84 return (struct rpc_clnt *)xprt; 84 .program = &mnt_program,
85 85 .version = version,
86 clnt = rpc_create_client(xprt, hostname, 86 .authflavor = RPC_AUTH_UNIX,
87 &mnt_program, version, 87 .flags = (RPC_CLNT_CREATE_ONESHOT |
88 RPC_AUTH_UNIX); 88 RPC_CLNT_CREATE_INTR),
89 if (!IS_ERR(clnt)) { 89 };
90 clnt->cl_softrtry = 1; 90
91 clnt->cl_oneshot = 1; 91 return rpc_create(&args);
92 clnt->cl_intr = 1;
93 }
94 return clnt;
95} 92}
96 93
97/* 94/*