SUNRPC: Bury "#ifdef IPV6" in svc_create_xprt()
Clean up: Bruce observed we have more or less common logic in each of svc_create_xprt()'s callers: the check to create an IPv6 RPC listener socket only if CONFIG_IPV6 is set. I'm about to add another case that does just the same. If we move the ifdefs into __svc_xpo_create(), then svc_create_xprt() call sites can get rid of the "#ifdef" ugliness, and can use the same logic with or without IPv6 support available in the kernel. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
This commit is contained in:

committed by
J. Bruce Fields

parent
205ba42308
commit
d6783b2b6c
@@ -243,11 +243,9 @@ static int make_socks(struct svc_serv *serv)
|
||||
if (err < 0)
|
||||
goto out_err;
|
||||
|
||||
#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
|
||||
err = create_lockd_family(serv, PF_INET6);
|
||||
if (err < 0 && err != -EAFNOSUPPORT)
|
||||
goto out_err;
|
||||
#endif /* CONFIG_IPV6 || CONFIG_IPV6_MODULE */
|
||||
|
||||
warned = 0;
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user