diff options
author | J. Bruce Fields <bfields@redhat.com> | 2012-08-14 15:50:34 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2012-08-21 17:07:48 -0400 |
commit | 39b553013719fe6495cf5e496b827b2d712e4265 (patch) | |
tree | 27e4c71fa94f08e19b4709c25a81b5eecf23c5ba /net/sunrpc/svcsock.c | |
parent | c3341966943284ab3618a1814cefd693ad9aa736 (diff) |
svcrpc: share some setup of listening sockets
There's some duplicate code here.
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'net/sunrpc/svcsock.c')
-rw-r--r-- | net/sunrpc/svcsock.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c index bf10b723f429..c7a7b14f54ed 100644 --- a/net/sunrpc/svcsock.c +++ b/net/sunrpc/svcsock.c | |||
@@ -1478,11 +1478,7 @@ int svc_addsock(struct svc_serv *serv, const int fd, char *name_return, | |||
1478 | } | 1478 | } |
1479 | if (kernel_getsockname(svsk->sk_sock, sin, &salen) == 0) | 1479 | if (kernel_getsockname(svsk->sk_sock, sin, &salen) == 0) |
1480 | svc_xprt_set_local(&svsk->sk_xprt, sin, salen); | 1480 | svc_xprt_set_local(&svsk->sk_xprt, sin, salen); |
1481 | clear_bit(XPT_TEMP, &svsk->sk_xprt.xpt_flags); | 1481 | svc_add_new_perm_xprt(serv, &svsk->sk_xprt); |
1482 | spin_lock_bh(&serv->sv_lock); | ||
1483 | list_add(&svsk->sk_xprt.xpt_list, &serv->sv_permsocks); | ||
1484 | spin_unlock_bh(&serv->sv_lock); | ||
1485 | svc_xprt_received(&svsk->sk_xprt); | ||
1486 | return svc_one_sock_name(svsk, name_return, len); | 1482 | return svc_one_sock_name(svsk, name_return, len); |
1487 | out: | 1483 | out: |
1488 | sockfd_put(so); | 1484 | sockfd_put(so); |