Lines Matching refs:sgt
158 static int setup_sgtable(struct sg_table *sgt, struct scatterlist *prealloc_sg, in setup_sgtable() argument
170 memset(sgt, 0, sizeof(*sgt)); in setup_sgtable()
180 ret = sg_alloc_table(sgt, chunk_cnt, GFP_NOFS); in setup_sgtable()
186 sgt->sgl = prealloc_sg; in setup_sgtable()
187 sgt->nents = sgt->orig_nents = 1; in setup_sgtable()
190 for_each_sg(sgt->sgl, sg, sgt->orig_nents, i) { in setup_sgtable()
210 static void teardown_sgtable(struct sg_table *sgt) in teardown_sgtable() argument
212 if (sgt->orig_nents > 1) in teardown_sgtable()
213 sg_free_table(sgt); in teardown_sgtable()
220 struct sg_table sgt; in ceph_aes_crypt() local
230 ret = setup_sgtable(&sgt, &prealloc_sg, buf, crypt_len); in ceph_aes_crypt()
237 skcipher_request_set_crypt(req, sgt.sgl, sgt.sgl, crypt_len, iv); in ceph_aes_crypt()
276 teardown_sgtable(&sgt); in ceph_aes_crypt()