[PATCH] knfsd: SUNRPC: allow creating an RPC service without registering with portmapper
Sometimes we need to create an RPC service but not register it with the local portmapper. NFSv4 delegation callback, for example. Change the svc_makesock() API to allow optionally creating temporary or permanent sockets, optionally registering with the local portmapper, and make it return the ephemeral port of the new socket. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Cc: Aurelien Charbon <aurelien.charbon@ext.bull.net> Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
6b174337e5
commit
482fb94e1b
@@ -235,7 +235,8 @@ static int nfsd_init_socks(int port)
|
||||
|
||||
error = lockd_up(IPPROTO_UDP);
|
||||
if (error >= 0) {
|
||||
error = svc_makesock(nfsd_serv, IPPROTO_UDP, port);
|
||||
error = svc_makesock(nfsd_serv, IPPROTO_UDP, port,
|
||||
SVC_SOCK_DEFAULTS);
|
||||
if (error < 0)
|
||||
lockd_down();
|
||||
}
|
||||
@@ -245,7 +246,8 @@ static int nfsd_init_socks(int port)
|
||||
#ifdef CONFIG_NFSD_TCP
|
||||
error = lockd_up(IPPROTO_TCP);
|
||||
if (error >= 0) {
|
||||
error = svc_makesock(nfsd_serv, IPPROTO_TCP, port);
|
||||
error = svc_makesock(nfsd_serv, IPPROTO_TCP, port,
|
||||
SVC_SOCK_DEFAULTS);
|
||||
if (error < 0)
|
||||
lockd_down();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user