Lines Matching refs:sgt
161 static int setup_sgtable(struct sg_table *sgt, struct scatterlist *prealloc_sg, in setup_sgtable() argument
173 memset(sgt, 0, sizeof(*sgt)); in setup_sgtable()
183 ret = sg_alloc_table(sgt, chunk_cnt, GFP_NOFS); in setup_sgtable()
189 sgt->sgl = prealloc_sg; in setup_sgtable()
190 sgt->nents = sgt->orig_nents = 1; in setup_sgtable()
193 for_each_sg(sgt->sgl, sg, sgt->orig_nents, i) { in setup_sgtable()
213 static void teardown_sgtable(struct sg_table *sgt) in teardown_sgtable() argument
215 if (sgt->orig_nents > 1) in teardown_sgtable()
216 sg_free_table(sgt); in teardown_sgtable()
223 struct sg_table sgt; in ceph_aes_crypt() local
233 ret = setup_sgtable(&sgt, &prealloc_sg, buf, crypt_len); in ceph_aes_crypt()
240 skcipher_request_set_crypt(req, sgt.sgl, sgt.sgl, crypt_len, iv); in ceph_aes_crypt()
279 teardown_sgtable(&sgt); in ceph_aes_crypt()