Commit 058ad9cb authored by Chuck Lever's avatar Chuck Lever Committed by Trond Myklebust

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: default avatarChuck Lever <chuck.lever@oracle.com>
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent 6daabf1b
...@@ -76,22 +76,19 @@ static struct rpc_clnt * ...@@ -76,22 +76,19 @@ static struct rpc_clnt *
mnt_create(char *hostname, struct sockaddr_in *srvaddr, int version, mnt_create(char *hostname, struct sockaddr_in *srvaddr, int version,
int protocol) int protocol)
{ {
struct rpc_xprt *xprt; struct rpc_create_args args = {
struct rpc_clnt *clnt; .protocol = protocol,
.address = (struct sockaddr *)srvaddr,
xprt = xprt_create_proto(protocol, srvaddr, NULL); .addrsize = sizeof(*srvaddr),
if (IS_ERR(xprt)) .servername = hostname,
return (struct rpc_clnt *)xprt; .program = &mnt_program,
.version = version,
clnt = rpc_create_client(xprt, hostname, .authflavor = RPC_AUTH_UNIX,
&mnt_program, version, .flags = (RPC_CLNT_CREATE_ONESHOT |
RPC_AUTH_UNIX); RPC_CLNT_CREATE_INTR),
if (!IS_ERR(clnt)) { };
clnt->cl_softrtry = 1;
clnt->cl_oneshot = 1; return rpc_create(&args);
clnt->cl_intr = 1;
}
return clnt;
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment