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

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

SUNRPC: Change svc_create_xprt() to take a @family argument



The sv_family field is going away.  Pass a protocol family argument to
svc_create_xprt() instead of extracting the family from the passed-in
svc_serv struct.

Again, as this is a listener socket and not an address, we make this
new argument an "int" protocol family, instead of an "sa_family_t."

Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent baf01caf
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -211,7 +211,8 @@ static int create_lockd_listener(struct svc_serv *serv, char *name,

	xprt = svc_find_xprt(serv, name, 0, 0);
	if (xprt == NULL)
		return svc_create_xprt(serv, name, port, SVC_SOCK_DEFAULTS);
		return svc_create_xprt(serv, name, nlmsvc_family,
					port, SVC_SOCK_DEFAULTS);

	svc_xprt_put(xprt);
	return 0;
+2 −2
Original line number Diff line number Diff line
@@ -122,8 +122,8 @@ int nfs_callback_up(void)
	if (!serv)
		goto out_err;

	ret = svc_create_xprt(serv, "tcp", nfs_callback_set_tcpport,
			      SVC_SOCK_ANONYMOUS);
	ret = svc_create_xprt(serv, "tcp", nfs_callback_family,
				nfs_callback_set_tcpport, SVC_SOCK_ANONYMOUS);
	if (ret <= 0)
		goto out_err;
	nfs_callback_tcpport = ret;
+1 −1
Original line number Diff line number Diff line
@@ -943,7 +943,7 @@ static ssize_t __write_ports(struct file *file, char *buf, size_t size)
			err = nfsd_create_serv();
			if (!err) {
				err = svc_create_xprt(nfsd_serv,
						      transport, port,
						      transport, PF_INET, port,
						      SVC_SOCK_ANONYMOUS);
				if (err == -ENOENT)
					/* Give a reasonable perror msg for
+2 −2
Original line number Diff line number Diff line
@@ -244,7 +244,7 @@ static int nfsd_init_socks(int port)
	if (!list_empty(&nfsd_serv->sv_permsocks))
		return 0;

	error = svc_create_xprt(nfsd_serv, "udp", port,
	error = svc_create_xprt(nfsd_serv, "udp", PF_INET, port,
					SVC_SOCK_DEFAULTS);
	if (error < 0)
		return error;
@@ -253,7 +253,7 @@ static int nfsd_init_socks(int port)
	if (error < 0)
		return error;

	error = svc_create_xprt(nfsd_serv, "tcp", port,
	error = svc_create_xprt(nfsd_serv, "tcp", PF_INET, port,
					SVC_SOCK_DEFAULTS);
	if (error < 0)
		return error;
+2 −1
Original line number Diff line number Diff line
@@ -71,7 +71,8 @@ int svc_reg_xprt_class(struct svc_xprt_class *);
void	svc_unreg_xprt_class(struct svc_xprt_class *);
void	svc_xprt_init(struct svc_xprt_class *, struct svc_xprt *,
		      struct svc_serv *);
int	svc_create_xprt(struct svc_serv *, char *, unsigned short, int);
int	svc_create_xprt(struct svc_serv *, const char *, const int,
			const unsigned short, int);
void	svc_xprt_enqueue(struct svc_xprt *xprt);
void	svc_xprt_received(struct svc_xprt *);
void	svc_xprt_put(struct svc_xprt *xprt);
Loading