Lines Matching defs:clone

1637 static void crypt_free_buffer_pages(struct crypt_config *cc, struct bio *clone);
1659 struct bio *clone;
1669 clone = bio_alloc_bioset(GFP_NOIO, nr_iovecs, &cc->bs);
1670 if (!clone)
1673 clone_init(io, clone);
1680 crypt_free_buffer_pages(cc, clone);
1681 bio_put(clone);
1688 bio_add_page(clone, page, len, 0);
1694 if (dm_crypt_integrity_io_alloc(io, clone)) {
1695 crypt_free_buffer_pages(cc, clone);
1696 bio_put(clone);
1697 clone = NULL;
1703 return clone;
1706 static void crypt_free_buffer_pages(struct crypt_config *cc, struct bio *clone)
1711 bio_for_each_segment_all(bv, clone, iter_all) {
1799 static void crypt_endio(struct bio *clone)
1801 struct dm_crypt_io *io = clone->bi_private;
1803 unsigned rw = bio_data_dir(clone);
1810 crypt_free_buffer_pages(cc, clone);
1812 error = clone->bi_status;
1813 bio_put(clone);
1826 static void clone_init(struct dm_crypt_io *io, struct bio *clone)
1830 clone->bi_private = io;
1831 clone->bi_end_io = crypt_endio;
1832 bio_set_dev(clone, cc->dev->bdev);
1833 clone->bi_opf = io->base_bio->bi_opf;
1839 struct bio *clone;
1847 clone = bio_clone_fast(io->base_bio, gfp, &cc->bs);
1848 if (!clone)
1853 clone_init(io, clone);
1854 clone->bi_iter.bi_sector = cc->start + io->sector;
1856 if (dm_crypt_integrity_io_alloc(io, clone)) {
1858 bio_put(clone);
1862 submit_bio_noacct(clone);
1886 struct bio *clone = io->ctx.bio_out;
1888 submit_bio_noacct(clone);
1948 struct bio *clone = io->ctx.bio_out;
1955 crypt_free_buffer_pages(cc, clone);
1956 bio_put(clone);
1961 /* crypt_convert should have filled the clone bio */
1964 clone->bi_iter.bi_sector = cc->start + io->sector;
1968 submit_bio_noacct(clone);
2047 struct bio *clone;
2058 clone = crypt_alloc_buffer(io, io->base_bio->bi_iter.bi_size);
2059 if (unlikely(!clone)) {
2064 io->ctx.bio_out = clone;
2065 io->ctx.iter_out = clone->bi_iter;
2067 sector += bio_sectors(clone);