]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - net/sctp/output.c
Merge branch 'for-4.13-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave...
[karo-tx-linux.git] / net / sctp / output.c
index 89cee1482d35592cf4e2d3a97e4b00cf47ed07de..9d8504985744f8153f985695e7123f48994d3494 100644 (file)
@@ -402,7 +402,7 @@ static void sctp_packet_set_owner_w(struct sk_buff *skb, struct sock *sk)
         * therefore only reserve a single byte to keep socket around until
         * the packet has been transmitted.
         */
-       atomic_inc(&sk->sk_wmem_alloc);
+       refcount_inc(&sk->sk_wmem_alloc);
 }
 
 static int sctp_packet_pack(struct sctp_packet *packet,
@@ -723,8 +723,8 @@ static sctp_xmit_t sctp_packet_can_append_data(struct sctp_packet *packet,
        /* Check whether this chunk and all the rest of pending data will fit
         * or delay in hopes of bundling a full sized packet.
         */
-       if (chunk->skb->len + q->out_qlen >
-               transport->pathmtu - packet->overhead - sizeof(sctp_data_chunk_t) - 4)
+       if (chunk->skb->len + q->out_qlen > transport->pathmtu -
+               packet->overhead - sizeof(struct sctp_data_chunk) - 4)
                /* Enough data queued to fill a packet */
                return SCTP_XMIT_OK;