aboutsummaryrefslogtreecommitdiffstats
path: root/net/tls/tls_sw.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2019-04-17 11:26:25 -0700
committerDavid S. Miller <davem@davemloft.net>2019-04-17 11:26:25 -0700
commit6b0a7f84ea1fe248df96ccc4dd86e817e32ef65b (patch)
tree0a7976054052e793da782c2b7ec34eccfbf66449 /net/tls/tls_sw.c
parentMerge branch 's390-next' (diff)
parentMerge tag 'for-linus-5.1-2' of git://github.com/cminyard/linux-ipmi (diff)
downloadlinux-dev-6b0a7f84ea1fe248df96ccc4dd86e817e32ef65b.tar.xz
linux-dev-6b0a7f84ea1fe248df96ccc4dd86e817e32ef65b.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflict resolution of af_smc.c from Stephen Rothwell. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tls/tls_sw.c')
-rw-r--r--net/tls/tls_sw.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/net/tls/tls_sw.c b/net/tls/tls_sw.c
index 4741edf4bb1e..f780b473827b 100644
--- a/net/tls/tls_sw.c
+++ b/net/tls/tls_sw.c
@@ -2065,20 +2065,7 @@ void tls_sw_free_resources_tx(struct sock *sk)
/* Free up un-sent records in tx_list. First, free
* the partially sent record if any at head of tx_list.
*/
- if (tls_ctx->partially_sent_record) {
- struct scatterlist *sg = tls_ctx->partially_sent_record;
-
- while (1) {
- put_page(sg_page(sg));
- sk_mem_uncharge(sk, sg->length);
-
- if (sg_is_last(sg))
- break;
- sg++;
- }
-
- tls_ctx->partially_sent_record = NULL;
-
+ if (tls_free_partial_record(sk, tls_ctx)) {
rec = list_first_entry(&ctx->tx_list,
struct tls_rec, list);
list_del(&rec->list);