Lines Matching refs:areq

659 static void af_alg_free_areq_sgls(struct af_alg_async_req *areq)  in af_alg_free_areq_sgls()  argument
661 struct sock *sk = areq->sk; in af_alg_free_areq_sgls()
669 list_for_each_entry_safe(rsgl, tmp, &areq->rsgl_list, list) { in af_alg_free_areq_sgls()
673 if (rsgl != &areq->first_rsgl) in af_alg_free_areq_sgls()
677 tsgl = areq->tsgl; in af_alg_free_areq_sgls()
679 for_each_sg(tsgl, sg, areq->tsgl_entries, i) { in af_alg_free_areq_sgls()
685 sock_kfree_s(sk, tsgl, areq->tsgl_entries * sizeof(*tsgl)); in af_alg_free_areq_sgls()
1045 void af_alg_free_resources(struct af_alg_async_req *areq) in af_alg_free_resources() argument
1047 struct sock *sk = areq->sk; in af_alg_free_resources()
1049 af_alg_free_areq_sgls(areq); in af_alg_free_resources()
1050 sock_kfree_s(sk, areq, areq->areqlen); in af_alg_free_resources()
1068 struct af_alg_async_req *areq = _req->data; in af_alg_async_cb() local
1069 struct sock *sk = areq->sk; in af_alg_async_cb()
1070 struct kiocb *iocb = areq->iocb; in af_alg_async_cb()
1074 resultlen = areq->outlen; in af_alg_async_cb()
1076 af_alg_free_resources(areq); in af_alg_async_cb()
1120 struct af_alg_async_req *areq = sock_kmalloc(sk, areqlen, GFP_KERNEL); in af_alg_alloc_areq() local
1122 if (unlikely(!areq)) in af_alg_alloc_areq()
1125 areq->areqlen = areqlen; in af_alg_alloc_areq()
1126 areq->sk = sk; in af_alg_alloc_areq()
1127 areq->last_rsgl = NULL; in af_alg_alloc_areq()
1128 INIT_LIST_HEAD(&areq->rsgl_list); in af_alg_alloc_areq()
1129 areq->tsgl = NULL; in af_alg_alloc_areq()
1130 areq->tsgl_entries = 0; in af_alg_alloc_areq()
1132 return areq; in af_alg_alloc_areq()
1149 struct af_alg_async_req *areq, size_t maxsize, in af_alg_get_rsgl() argument
1168 if (list_empty(&areq->rsgl_list)) { in af_alg_get_rsgl()
1169 rsgl = &areq->first_rsgl; in af_alg_get_rsgl()
1177 list_add_tail(&rsgl->list, &areq->rsgl_list); in af_alg_get_rsgl()
1187 if (areq->last_rsgl) in af_alg_get_rsgl()
1188 af_alg_link_sg(&areq->last_rsgl->sgl, &rsgl->sgl); in af_alg_get_rsgl()
1190 areq->last_rsgl = rsgl; in af_alg_get_rsgl()