summaryrefslogtreecommitdiffstats
path: root/net/sunrpc/svcsock.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2006-10-04 11:15:45 +0200
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-04 16:55:15 +0200
commit5680c44632053a6c9464bca43083f01776d318da (patch)
tree220f7bcb0168972bbc2ce804074f42b5470a1e15 /net/sunrpc/svcsock.c
parent[PATCH] knfsd: Protect update to sn_nrthreads with lock_kernel (diff)
downloadlinux-5680c44632053a6c9464bca43083f01776d318da.tar.xz
linux-5680c44632053a6c9464bca43083f01776d318da.zip
[PATCH] knfsd: Fixed handling of lockd fail when adding nfsd socket
Arrgg.. We cannot 'lockd_up' before 'svc_addsock' as we don't know the protocol yet.... So switch it around again and save the name of the created sockets so that it can be closed if lock_up fails. Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'net/sunrpc/svcsock.c')
-rw-r--r--net/sunrpc/svcsock.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c
index 4e0813b12ccf..4de8626e4f54 100644
--- a/net/sunrpc/svcsock.c
+++ b/net/sunrpc/svcsock.c
@@ -492,6 +492,9 @@ svc_sock_names(char *buf, struct svc_serv *serv, char *toclose)
}
spin_unlock(&serv->sv_lock);
if (closesk)
+ /* Should unregister with portmap, but you cannot
+ * unregister just one protocol...
+ */
svc_delete_socket(closesk);
else if (toclose)
return -ENOENT;