chelsio/chtls: correct function return and return type

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

Fixes: 3b8305f5c8 ("crypto: chtls - wait for memory sendmsg, sendpage")
Signed-off-by: Vinay Kumar Yadav <vinay.yadav@chelsio.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
Vinay Kumar Yadav 2020-10-19 17:20:24 +05:30 committed by Jakub Kicinski
parent 9819f22c41
commit 8580a61aed
1 changed files with 2 additions and 2 deletions

View File

@ -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,