--- initial
+++ final
@@ -1,133 +1,133 @@
 static int crypt_ctr(struct dm_target *ti, unsigned int argc, char **argv) {
   struct crypt_config *cc;
   int key_size;
   unsigned int align_mask;
   unsigned long long tmpll;
   int ret;
   size_t iv_size_padding, additional_req_size;
   char dummy;
   if (argc < 5) {
     ti->error = "Not enough arguments";
     return -EINVAL;
   }
   key_size = get_key_size(&argv[1]);
   if (key_size < 0) {
     ti->error = "Cannot parse key size";
     return -EINVAL;
   }
   cc = kzalloc(sizeof(*cc) + key_size * sizeof(u8), GFP_KERNEL);
   if (!cc) {
     ti->error = "Cannot allocate encryption context";
     return -ENOMEM;
   }
   cc->key_size = key_size;
   cc->sector_size = (1 << SECTOR_SHIFT);
   cc->sector_shift = 0;
   ti->private = cc;
   /* Optional parameters need to be read before cipher constructor */
   if (argc > 5) {
     ret = crypt_ctr_optional(ti, argc - 5, &argv[5]);
     if (ret) goto bad;
   }
   ret = crypt_ctr_cipher(ti, argv[0], argv[1]);
   if (ret < 0) goto bad;
   if (crypt_integrity_aead(cc)) {
     cc->dmreq_start = sizeof(struct aead_request);
     cc->dmreq_start += crypto_aead_reqsize(any_tfm_aead(cc));
     align_mask = crypto_aead_alignmask(any_tfm_aead(cc));
   } else {
     cc->dmreq_start = sizeof(struct skcipher_request);
     cc->dmreq_start += crypto_skcipher_reqsize(any_tfm(cc));
     align_mask = crypto_skcipher_alignmask(any_tfm(cc));
   }
   cc->dmreq_start = ALIGN(cc->dmreq_start, __alignof__(struct dm_crypt_request));
   if (align_mask < CRYPTO_MINALIGN) {
     /* Allocate the padding exactly */
     iv_size_padding = -(cc->dmreq_start + sizeof(struct dm_crypt_request)) & align_mask;
   } else {
     /*
      * If the cipher requires greater alignment than kmalloc
      * alignment, we don't know the exact position of the
      * initialization vector. We must assume worst case.
      */
     iv_size_padding = align_mask;
   }
   ret = -ENOMEM;
   /*  ...| IV + padding | original IV | original sec. number | bio tag offset | */
   additional_req_size = sizeof(struct dm_crypt_request) + iv_size_padding + cc->iv_size + cc->iv_size + sizeof(uint64_t) + sizeof(unsigned int);
   cc->req_pool = mempool_create_kmalloc_pool(MIN_IOS, cc->dmreq_start + additional_req_size);
   if (!cc->req_pool) {
     ti->error = "Cannot allocate crypt request mempool";
     goto bad;
   }
   cc->per_bio_data_size = ti->per_io_data_size = ALIGN(sizeof(struct dm_crypt_io) + cc->dmreq_start + additional_req_size, ARCH_KMALLOC_MINALIGN);
   cc->page_pool = mempool_create_page_pool(BIO_MAX_PAGES, 0);
   if (!cc->page_pool) {
     ti->error = "Cannot allocate page mempool";
     goto bad;
   }
-  cc->bs = bioset_create(MIN_IOS, 0);
+  cc->bs = bioset_create(MIN_IOS, 0, BIOSET_NEED_BVECS);
   if (!cc->bs) {
     ti->error = "Cannot allocate crypt bioset";
     goto bad;
   }
   mutex_init(&cc->bio_alloc_lock);
   ret = -EINVAL;
   if ((sscanf(argv[2], "%llu%c", &tmpll, &dummy) != 1) || (tmpll & ((cc->sector_size >> SECTOR_SHIFT) - 1))) {
     ti->error = "Invalid iv_offset sector";
     goto bad;
   }
   cc->iv_offset = tmpll;
   ret = dm_get_device(ti, argv[3], dm_table_get_mode(ti->table), &cc->dev);
   if (ret) {
     ti->error = "Device lookup failed";
     goto bad;
   }
   ret = -EINVAL;
   if (sscanf(argv[4], "%llu%c", &tmpll, &dummy) != 1) {
     ti->error = "Invalid device sector";
     goto bad;
   }
   cc->start = tmpll;
   if (crypt_integrity_aead(cc) || cc->integrity_iv_size) {
     ret = crypt_integrity_ctr(cc, ti);
     if (ret) goto bad;
     cc->tag_pool_max_sectors = POOL_ENTRY_SIZE / cc->on_disk_tag_size;
     if (!cc->tag_pool_max_sectors) cc->tag_pool_max_sectors = 1;
     cc->tag_pool = mempool_create_kmalloc_pool(MIN_IOS, cc->tag_pool_max_sectors * cc->on_disk_tag_size);
     if (!cc->tag_pool) {
       ti->error = "Cannot allocate integrity tags mempool";
       goto bad;
     }
     cc->tag_pool_max_sectors <<= cc->sector_shift;
   }
   ret = -ENOMEM;
   cc->io_queue = alloc_workqueue("kcryptd_io", WQ_HIGHPRI | WQ_CPU_INTENSIVE | WQ_MEM_RECLAIM, 1);
   if (!cc->io_queue) {
     ti->error = "Couldn't create kcryptd io queue";
     goto bad;
   }
   if (test_bit(DM_CRYPT_SAME_CPU, &cc->flags))
     cc->crypt_queue = alloc_workqueue("kcryptd", WQ_HIGHPRI | WQ_CPU_INTENSIVE | WQ_MEM_RECLAIM, 1);
   else
     cc->crypt_queue = alloc_workqueue("kcryptd", WQ_HIGHPRI | WQ_CPU_INTENSIVE | WQ_MEM_RECLAIM | WQ_UNBOUND, num_online_cpus());
   if (!cc->crypt_queue) {
     ti->error = "Couldn't create kcryptd queue";
     goto bad;
   }
   init_waitqueue_head(&cc->write_thread_wait);
   cc->write_tree = RB_ROOT;
   cc->write_thread = kthread_create(dmcrypt_write, cc, "dmcrypt_write");
   if (IS_ERR(cc->write_thread)) {
     ret = PTR_ERR(cc->write_thread);
     cc->write_thread = NULL;
     ti->error = "Couldn't spawn write thread";
     goto bad;
   }
   wake_up_process(cc->write_thread);
   ti->num_flush_bios = 1;
   return 0;
 bad:
   crypt_dtr(ti);
   return ret;
 }<sep>@@
expression e1,e2;
@@
-bioset_create(e1,e2)
+bioset_create(e1,e2,BIOSET_NEED_BVECS)