diff options
author | 2022-04-11 12:19:09 -0700 | |
---|---|---|
committer | 2022-04-13 11:45:39 +0100 | |
commit | 0775639ce1ca953503121e350d6b885366f56a52 (patch) | |
tree | 70914710f708813e663f23b6061e1294664be92c /net/tls | |
parent | tls: rx: consistently use unlocked accessors for rx_list (diff) | |
download | linux-0775639ce1ca953503121e350d6b885366f56a52.tar.gz linux-0775639ce1ca953503121e350d6b885366f56a52.tar.bz2 linux-0775639ce1ca953503121e350d6b885366f56a52.zip |
tls: rx: reuse leave_on_list label for psock
The code is identical, we can save a few LoC.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tls')
-rw-r--r-- | net/tls/tls_sw.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/net/tls/tls_sw.c b/net/tls/tls_sw.c index 461734a27297..fd19047fa6c6 100644 --- a/net/tls/tls_sw.c +++ b/net/tls/tls_sw.c @@ -1775,14 +1775,10 @@ int tls_sw_recvmsg(struct sock *sk, skb = tls_wait_data(sk, psock, flags & MSG_DONTWAIT, timeo, &err); if (!skb) { if (psock) { - int ret = sk_msg_recvmsg(sk, psock, msg, len, - flags); - - if (ret > 0) { - decrypted += ret; - len -= ret; - continue; - } + chunk = sk_msg_recvmsg(sk, psock, msg, len, + flags); + if (chunk > 0) + goto leave_on_list; } goto recv_end; } |