]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - net/sctp/chunk.c
Merge tag 'tty-4.13-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
[karo-tx-linux.git] / net / sctp / chunk.c
index 697721a7a3f1761373aa66b847bd744ea1b42d10..1323d41e68b82e9cb826dbc3112709db3e0166c9 100644 (file)
@@ -49,7 +49,7 @@
 /* Initialize datamsg from memory. */
 static void sctp_datamsg_init(struct sctp_datamsg *msg)
 {
-       atomic_set(&msg->refcnt, 1);
+       refcount_set(&msg->refcnt, 1);
        msg->send_failed = 0;
        msg->send_error = 0;
        msg->can_delay = 1;
@@ -136,13 +136,13 @@ static void sctp_datamsg_destroy(struct sctp_datamsg *msg)
 /* Hold a reference. */
 static void sctp_datamsg_hold(struct sctp_datamsg *msg)
 {
-       atomic_inc(&msg->refcnt);
+       refcount_inc(&msg->refcnt);
 }
 
 /* Release a reference. */
 void sctp_datamsg_put(struct sctp_datamsg *msg)
 {
-       if (atomic_dec_and_test(&msg->refcnt))
+       if (refcount_dec_and_test(&msg->refcnt))
                sctp_datamsg_destroy(msg);
 }
 
@@ -307,7 +307,7 @@ int sctp_chunk_abandoned(struct sctp_chunk *chunk)
        if (SCTP_PR_TTL_ENABLED(chunk->sinfo.sinfo_flags) &&
            time_after(jiffies, chunk->msg->expires_at)) {
                struct sctp_stream_out *streamout =
-                       &chunk->asoc->stream->out[chunk->sinfo.sinfo_stream];
+                       &chunk->asoc->stream.out[chunk->sinfo.sinfo_stream];
 
                if (chunk->sent_count) {
                        chunk->asoc->abandoned_sent[SCTP_PR_INDEX(TTL)]++;
@@ -320,7 +320,7 @@ int sctp_chunk_abandoned(struct sctp_chunk *chunk)
        } else if (SCTP_PR_RTX_ENABLED(chunk->sinfo.sinfo_flags) &&
                   chunk->sent_count > chunk->sinfo.sinfo_timetolive) {
                struct sctp_stream_out *streamout =
-                       &chunk->asoc->stream->out[chunk->sinfo.sinfo_stream];
+                       &chunk->asoc->stream.out[chunk->sinfo.sinfo_stream];
 
                chunk->asoc->abandoned_sent[SCTP_PR_INDEX(RTX)]++;
                streamout->abandoned_sent[SCTP_PR_INDEX(RTX)]++;