提交 34ef1ed1 编写于 作者: J Jakub Kicinski 提交者: David S. Miller

net/tls: make allocation failure unlikely

Make sure GCC realizes it's unlikely that allocations will fail.
Signed-off-by: NJakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: NDirk van der Merwe <dirk.vandermerwe@netronome.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 93277b25
......@@ -452,9 +452,8 @@ static int tls_push_data(struct sock *sk,
max_open_record_len = TLS_MAX_PAYLOAD_SIZE +
prot->prepend_size;
do {
rc = tls_do_allocation(sk, ctx, pfrag,
prot->prepend_size);
if (rc) {
rc = tls_do_allocation(sk, ctx, pfrag, prot->prepend_size);
if (unlikely(rc)) {
rc = sk_stream_wait_memory(sk, &timeo);
if (!rc)
continue;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册