Skip to content

Commit 1cd4d5c

Browse files
lxindavem330
authored andcommitted
sctp: remove the unused sctp_datamsg_free()
Since commit 8b570dc ("sctp: only drop the reference on the datamsg after sending a msg") used sctp_datamsg_put in sctp_sendmsg, instead of sctp_datamsg_free, this function has no use in sctp. So we will remove it. Signed-off-by: Xin Long <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent ac1efde commit 1cd4d5c

File tree

2 files changed

+0
-14
lines changed

2 files changed

+0
-14
lines changed

include/net/sctp/structs.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,6 @@ struct sctp_datamsg {
535535
struct sctp_datamsg *sctp_datamsg_from_user(struct sctp_association *,
536536
struct sctp_sndrcvinfo *,
537537
struct iov_iter *);
538-
void sctp_datamsg_free(struct sctp_datamsg *);
539538
void sctp_datamsg_put(struct sctp_datamsg *);
540539
void sctp_chunk_fail(struct sctp_chunk *, int error);
541540
int sctp_chunk_abandoned(struct sctp_chunk *);

net/sctp/chunk.c

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -70,19 +70,6 @@ static struct sctp_datamsg *sctp_datamsg_new(gfp_t gfp)
7070
return msg;
7171
}
7272

73-
void sctp_datamsg_free(struct sctp_datamsg *msg)
74-
{
75-
struct sctp_chunk *chunk;
76-
77-
/* This doesn't have to be a _safe vairant because
78-
* sctp_chunk_free() only drops the refs.
79-
*/
80-
list_for_each_entry(chunk, &msg->chunks, frag_list)
81-
sctp_chunk_free(chunk);
82-
83-
sctp_datamsg_put(msg);
84-
}
85-
8673
/* Final destructruction of datamsg memory. */
8774
static void sctp_datamsg_destroy(struct sctp_datamsg *msg)
8875
{

0 commit comments

Comments
 (0)