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

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

NFS: Kernel mount client should use async bind



Simplify the in-kernel mount client by using autobind instead of an
explicit call to rpc_getport_sync.

Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent b79dc8ce
Loading
Loading
Loading
Loading
+5 −16
Original line number Original line Diff line number Diff line
@@ -1027,15 +1027,7 @@ static int nfs_try_mount(struct nfs_parsed_mount_data *args,
		sin = args->mount_server.address;
		sin = args->mount_server.address;
	else
	else
		sin = args->nfs_server.address;
		sin = args->nfs_server.address;
	if (args->mount_server.port == 0) {
	if (args->mount_server.port != 0)
		status = rpcb_getport_sync(&sin,
					   args->mount_server.program,
					   args->mount_server.version,
					   args->mount_server.protocol);
		if (status < 0)
			goto out_err;
		sin.sin_port = htons(status);
	} else
		sin.sin_port = htons(args->mount_server.port);
		sin.sin_port = htons(args->mount_server.port);


	/*
	/*
@@ -1049,14 +1041,11 @@ static int nfs_try_mount(struct nfs_parsed_mount_data *args,
			   args->mount_server.version,
			   args->mount_server.version,
			   args->mount_server.protocol,
			   args->mount_server.protocol,
			   root_fh);
			   root_fh);
	if (status < 0)
	if (status == 0)
		goto out_err;
		return 0;

	return status;


out_err:
	dfprintk(MOUNT, "NFS: unable to mount server " NIPQUAD_FMT
	dfprintk(MOUNT, "NFS: unable to contact server on host "
			", error %d\n", NIPQUAD(sin.sin_addr.s_addr), status);
		 NIPQUAD_FMT "\n", NIPQUAD(sin.sin_addr.s_addr));
	return status;
	return status;
}
}