Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+13 −16
Original line number Diff line number Diff line
@@ -76,22 +76,19 @@ static struct rpc_clnt *
mnt_create(char *hostname, struct sockaddr_in *srvaddr, int version,
		int protocol)
{
	struct rpc_xprt	*xprt;
	struct rpc_clnt	*clnt;

	xprt = xprt_create_proto(protocol, srvaddr, NULL);
	if (IS_ERR(xprt))
		return (struct rpc_clnt *)xprt;

	clnt = rpc_create_client(xprt, hostname,
				&mnt_program, version,
				RPC_AUTH_UNIX);
	if (!IS_ERR(clnt)) {
		clnt->cl_softrtry = 1;
		clnt->cl_oneshot  = 1;
		clnt->cl_intr = 1;
	}
	return clnt;
	struct rpc_create_args args = {
		.protocol	= protocol,
		.address	= (struct sockaddr *)srvaddr,
		.addrsize	= sizeof(*srvaddr),
		.servername	= hostname,
		.program	= &mnt_program,
		.version	= version,
		.authflavor	= RPC_AUTH_UNIX,
		.flags		= (RPC_CLNT_CREATE_ONESHOT |
				   RPC_CLNT_CREATE_INTR),
	};

	return rpc_create(&args);
}

/*