aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc/svcsock.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sunrpc/svcsock.c')
-rw-r--r--net/sunrpc/svcsock.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c
index d120fadeb1ae..7292baf5a741 100644
--- a/net/sunrpc/svcsock.c
+++ b/net/sunrpc/svcsock.c
@@ -938,7 +938,7 @@ svc_tcp_accept(struct svc_sock *svsk)
938 if (!(newsvsk = svc_setup_socket(serv, newsock, &err, 938 if (!(newsvsk = svc_setup_socket(serv, newsock, &err,
939 (SVC_SOCK_ANONYMOUS | SVC_SOCK_TEMPORARY)))) 939 (SVC_SOCK_ANONYMOUS | SVC_SOCK_TEMPORARY))))
940 goto failed; 940 goto failed;
941 941 svc_sock_received(newsvsk);
942 942
943 /* make sure that we don't have too many active connections. 943 /* make sure that we don't have too many active connections.
944 * If we have, something must be dropped. 944 * If we have, something must be dropped.
@@ -1546,8 +1546,6 @@ static struct svc_sock *svc_setup_socket(struct svc_serv *serv,
1546 dprintk("svc: svc_setup_socket created %p (inet %p)\n", 1546 dprintk("svc: svc_setup_socket created %p (inet %p)\n",
1547 svsk, svsk->sk_sk); 1547 svsk, svsk->sk_sk);
1548 1548
1549 clear_bit(SK_BUSY, &svsk->sk_flags);
1550 svc_sock_enqueue(svsk);
1551 return svsk; 1549 return svsk;
1552} 1550}
1553 1551
@@ -1571,8 +1569,10 @@ int svc_addsock(struct svc_serv *serv,
1571 err = -EISCONN; 1569 err = -EISCONN;
1572 else { 1570 else {
1573 svsk = svc_setup_socket(serv, so, &err, SVC_SOCK_DEFAULTS); 1571 svsk = svc_setup_socket(serv, so, &err, SVC_SOCK_DEFAULTS);
1574 if (svsk) 1572 if (svsk) {
1573 svc_sock_received(svsk);
1575 err = 0; 1574 err = 0;
1575 }
1576 } 1576 }
1577 if (err) { 1577 if (err) {
1578 sockfd_put(so); 1578 sockfd_put(so);
@@ -1623,8 +1623,10 @@ static int svc_create_socket(struct svc_serv *serv, int protocol,
1623 goto bummer; 1623 goto bummer;
1624 } 1624 }
1625 1625
1626 if ((svsk = svc_setup_socket(serv, sock, &error, flags)) != NULL) 1626 if ((svsk = svc_setup_socket(serv, sock, &error, flags)) != NULL) {
1627 svc_sock_received(svsk);
1627 return ntohs(inet_sk(svsk->sk_sk)->sport); 1628 return ntohs(inet_sk(svsk->sk_sk)->sport);
1629 }
1628 1630
1629bummer: 1631bummer:
1630 dprintk("svc: svc_create_socket error = %d\n", -error); 1632 dprintk("svc: svc_create_socket error = %d\n", -error);