提交 8580a61a 编写于 作者: V Vinay Kumar Yadav 提交者: Jakub Kicinski

chelsio/chtls: correct function return and return type

csk_mem_free() should return true if send buffer is available,
false otherwise.

Fixes: 3b8305f5 ("crypto: chtls - wait for memory sendmsg, sendpage")
Signed-off-by: NVinay Kumar Yadav <vinay.yadav@chelsio.com>
Signed-off-by: NJakub Kicinski <kuba@kernel.org>
上级 9819f22c
......@@ -902,9 +902,9 @@ static int chtls_skb_copy_to_page_nocache(struct sock *sk,
return 0;
}
static int csk_mem_free(struct chtls_dev *cdev, struct sock *sk)
static bool csk_mem_free(struct chtls_dev *cdev, struct sock *sk)
{
return (cdev->max_host_sndbuf - sk->sk_wmem_queued);
return (cdev->max_host_sndbuf - sk->sk_wmem_queued > 0);
}
static int csk_wait_memory(struct chtls_dev *cdev,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册