Lines Matching refs:rsgl
774 struct af_alg_rsgl *rsgl, *tmp; in af_alg_free_areq_sgls() local
779 list_for_each_entry_safe(rsgl, tmp, &areq->rsgl_list, list) { in af_alg_free_areq_sgls()
780 atomic_sub(rsgl->sg_num_bytes, &ctx->rcvused); in af_alg_free_areq_sgls()
781 af_alg_free_sg(&rsgl->sgl); in af_alg_free_areq_sgls()
782 list_del(&rsgl->list); in af_alg_free_areq_sgls()
783 if (rsgl != &areq->first_rsgl) in af_alg_free_areq_sgls()
784 sock_kfree_s(sk, rsgl, sizeof(*rsgl)); in af_alg_free_areq_sgls()
1241 struct af_alg_rsgl *rsgl; in af_alg_get_rsgl() local
1253 rsgl = &areq->first_rsgl; in af_alg_get_rsgl()
1255 rsgl = sock_kmalloc(sk, sizeof(*rsgl), GFP_KERNEL); in af_alg_get_rsgl()
1256 if (unlikely(!rsgl)) in af_alg_get_rsgl()
1260 rsgl->sgl.need_unpin = in af_alg_get_rsgl()
1262 rsgl->sgl.sgt.sgl = rsgl->sgl.sgl; in af_alg_get_rsgl()
1263 rsgl->sgl.sgt.nents = 0; in af_alg_get_rsgl()
1264 rsgl->sgl.sgt.orig_nents = 0; in af_alg_get_rsgl()
1265 list_add_tail(&rsgl->list, &areq->rsgl_list); in af_alg_get_rsgl()
1267 sg_init_table(rsgl->sgl.sgt.sgl, ALG_MAX_PAGES); in af_alg_get_rsgl()
1268 err = extract_iter_to_sg(&msg->msg_iter, seglen, &rsgl->sgl.sgt, in af_alg_get_rsgl()
1271 rsgl->sg_num_bytes = 0; in af_alg_get_rsgl()
1275 sg_mark_end(rsgl->sgl.sgt.sgl + rsgl->sgl.sgt.nents - 1); in af_alg_get_rsgl()
1279 af_alg_link_sg(&areq->last_rsgl->sgl, &rsgl->sgl); in af_alg_get_rsgl()
1281 areq->last_rsgl = rsgl; in af_alg_get_rsgl()
1284 rsgl->sg_num_bytes = err; in af_alg_get_rsgl()