summaryrefslogtreecommitdiffstats
path: root/net/sctp/associola.c
diff options
context:
space:
mode:
authorXin Long <lucien.xin@gmail.com>2017-06-10 09:27:12 +0200
committerDavid S. Miller <davem@davemloft.net>2017-06-10 22:23:31 +0200
commit4abf5a653bf837aa93ad3fcf7cc918e90f44fb2d (patch)
tree7241d1b73241cf1c782ed695a12837395bf4fc72 /net/sctp/associola.c
parentsctp: use read_lock_bh in sctp_eps_seq_show (diff)
downloadlinux-4abf5a653bf837aa93ad3fcf7cc918e90f44fb2d.tar.xz
linux-4abf5a653bf837aa93ad3fcf7cc918e90f44fb2d.zip
sctp: no need to check assoc id before calling sctp_assoc_set_id
sctp_assoc_set_id does the assoc id check in the beginning when processing dupcookie, no need to do the same check before calling it. v1->v2: fix some typo errs Marcelo pointed in changelog. Signed-off-by: Xin Long <lucien.xin@gmail.com> Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp/associola.c')
-rw-r--r--net/sctp/associola.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/net/sctp/associola.c b/net/sctp/associola.c
index 288c5e0cda5d..72b07dd9b959 100644
--- a/net/sctp/associola.c
+++ b/net/sctp/associola.c
@@ -1181,12 +1181,8 @@ void sctp_assoc_update(struct sctp_association *asoc,
if (sctp_state(asoc, COOKIE_WAIT))
sctp_stream_update(&asoc->stream, &new->stream);
- if (!asoc->assoc_id) {
- /* get a new association id since we don't have one
- * yet.
- */
- sctp_assoc_set_id(asoc, GFP_ATOMIC);
- }
+ /* get a new assoc id if we don't have one yet. */
+ sctp_assoc_set_id(asoc, GFP_ATOMIC);
}
/* SCTP-AUTH: Save the peer parameters from the new associations