summaryrefslogtreecommitdiffstats
path: root/net/tls
diff options
context:
space:
mode:
authorJakub Kicinski <jakub.kicinski@netronome.com>2019-09-02 21:31:06 -0700
committerDavid S. Miller <davem@davemloft.net>2019-09-05 09:49:49 +0200
commit6e3d02b670eafce69aa64457b87c3b17ff216d23 (patch)
tree87b421fee34bd7c9238ac50bebda2b27883c87f0 /net/tls
parentbe2fbc155fc8c0ff6e499753354d965cd9cf1bb0 (diff)
downloadlinux-6e3d02b670eafce69aa64457b87c3b17ff216d23.tar.gz
linux-6e3d02b670eafce69aa64457b87c3b17ff216d23.tar.bz2
linux-6e3d02b670eafce69aa64457b87c3b17ff216d23.zip
net/tls: dedup the record cleanup
If retransmit record hint fall into the cleanup window we will free it by just walking the list. No need to duplicate the code. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Reviewed-by: John Hurley <john.hurley@netronome.com> Reviewed-by: Dirk van der Merwe <dirk.vandermerwe@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tls')
-rw-r--r--net/tls/tls_device.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/net/tls/tls_device.c b/net/tls/tls_device.c
index 9e1bec1a0a28..41c106e45f01 100644
--- a/net/tls/tls_device.c
+++ b/net/tls/tls_device.c
@@ -159,12 +159,8 @@ static void tls_icsk_clean_acked(struct sock *sk, u32 acked_seq)
spin_lock_irqsave(&ctx->lock, flags);
info = ctx->retransmit_hint;
- if (info && !before(acked_seq, info->end_seq)) {
+ if (info && !before(acked_seq, info->end_seq))
ctx->retransmit_hint = NULL;
- list_del(&info->list);
- destroy_record(info);
- deleted_records++;
- }
list_for_each_entry_safe(info, temp, &ctx->records_list, list) {
if (before(acked_seq, info->end_seq))