]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/sctp/socket.c
mac80211: fix deadlocks in debugfs_netdev.c
[linux-2.6-omap-h63xx.git] / net / sctp / socket.c
index a3138a0fe2c50a5ef1904f243d3d6b0ceba68868..00ebd0610be2509f840634e757ee583af8e5dacc 100644 (file)
@@ -1729,7 +1729,7 @@ SCTP_STATIC int sctp_sendmsg(struct kiocb *iocb, struct sock *sk,
        /* Now send the (possibly) fragmented message. */
        list_for_each(pos, &datamsg->chunks) {
                chunk = list_entry(pos, struct sctp_chunk, frag_list);
-               sctp_datamsg_track(chunk);
+               sctp_chunk_hold(chunk);
 
                /* Do accounting for the write space.  */
                sctp_set_owner_w(chunk);
@@ -1748,7 +1748,7 @@ SCTP_STATIC int sctp_sendmsg(struct kiocb *iocb, struct sock *sk,
                SCTP_DEBUG_PRINTK("We sent primitively.\n");
        }
 
-       sctp_datamsg_free(datamsg);
+       sctp_datamsg_put(datamsg);
        if (err)
                goto out_free;
        else
@@ -6513,8 +6513,6 @@ static void sctp_sock_migrate(struct sock *oldsk, struct sock *newsk,
 }
 
 
-DEFINE_PROTO_INUSE(sctp)
-
 /* This proto struct describes the ULP interface for SCTP.  */
 struct proto sctp_prot = {
        .name        =  "SCTP",
@@ -6544,11 +6542,9 @@ struct proto sctp_prot = {
        .enter_memory_pressure = sctp_enter_memory_pressure,
        .memory_allocated = &sctp_memory_allocated,
        .sockets_allocated = &sctp_sockets_allocated,
-       REF_PROTO_INUSE(sctp)
 };
 
 #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
-DEFINE_PROTO_INUSE(sctpv6)
 
 struct proto sctpv6_prot = {
        .name           = "SCTPv6",
@@ -6578,6 +6574,5 @@ struct proto sctpv6_prot = {
        .enter_memory_pressure = sctp_enter_memory_pressure,
        .memory_allocated = &sctp_memory_allocated,
        .sockets_allocated = &sctp_sockets_allocated,
-       REF_PROTO_INUSE(sctpv6)
 };
 #endif /* defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) */