Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 90256
b: refs/heads/master
c: 80445cf
h: refs/heads/master
v: v3
  • Loading branch information
Florian Westphal authored and David S. Miller committed Mar 24, 2008
1 parent 2d3c62d commit 15a90c2
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 20 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2444844cefd2ce0ac73858cf980de07e33a5dd20
refs/heads/master: 80445cfb28a6b093540582b68d9ae928bf34cfe7
2 changes: 0 additions & 2 deletions trunk/include/net/sctp/structs.h
Original file line number Diff line number Diff line change
Expand Up @@ -637,8 +637,6 @@ struct sctp_datamsg *sctp_datamsg_from_user(struct sctp_association *,
struct sctp_sndrcvinfo *,
struct msghdr *, int len);
void sctp_datamsg_put(struct sctp_datamsg *);
void sctp_datamsg_free(struct sctp_datamsg *);
void sctp_datamsg_track(struct sctp_chunk *);
void sctp_chunk_fail(struct sctp_chunk *, int error);
int sctp_chunk_abandoned(struct sctp_chunk *);

Expand Down
16 changes: 1 addition & 15 deletions trunk/net/sctp/chunk.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,20 +136,6 @@ void sctp_datamsg_put(struct sctp_datamsg *msg)
sctp_datamsg_destroy(msg);
}

/* Free a message. Really just give up a reference, the
* really free happens in sctp_datamsg_destroy().
*/
void sctp_datamsg_free(struct sctp_datamsg *msg)
{
sctp_datamsg_put(msg);
}

/* Hold on to all the fragments until all chunks have been sent. */
void sctp_datamsg_track(struct sctp_chunk *chunk)
{
sctp_chunk_hold(chunk);
}

/* Assign a chunk to this datamsg. */
static void sctp_datamsg_assign(struct sctp_datamsg *msg, struct sctp_chunk *chunk)
{
Expand Down Expand Up @@ -295,7 +281,7 @@ struct sctp_datamsg *sctp_datamsg_from_user(struct sctp_association *asoc,
chunk = list_entry(pos, struct sctp_chunk, frag_list);
sctp_chunk_free(chunk);
}
sctp_datamsg_free(msg);
sctp_datamsg_put(msg);
return NULL;
}

Expand Down
4 changes: 2 additions & 2 deletions trunk/net/sctp/socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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
Expand Down

0 comments on commit 15a90c2

Please sign in to comment.