]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/sctp/associola.c
Merge ../scsi-rc-fixes-2.6
[linux-2.6-omap-h63xx.git] / net / sctp / associola.c
index 27329ce9c311dc8aaf74c020911fb3d026aeab74..ed0445fe85e7dac8dcc670986cf9745bde58c1de 100644 (file)
@@ -346,11 +346,18 @@ void sctp_association_free(struct sctp_association *asoc)
        struct list_head *pos, *temp;
        int i;
 
-       list_del(&asoc->asocs);
+       /* Only real associations count against the endpoint, so
+        * don't bother for if this is a temporary association.
+        */
+       if (!asoc->temp) {
+               list_del(&asoc->asocs);
 
-       /* Decrement the backlog value for a TCP-style listening socket. */
-       if (sctp_style(sk, TCP) && sctp_sstate(sk, LISTENING))
-               sk->sk_ack_backlog--;
+               /* Decrement the backlog value for a TCP-style listening
+                * socket.
+                */
+               if (sctp_style(sk, TCP) && sctp_sstate(sk, LISTENING))
+                       sk->sk_ack_backlog--;
+       }
 
        /* Mark as dead, so other users can know this structure is
         * going away.