siimage: fix wrong ->swdma_mask
[firefly-linux-kernel-4.4.55.git] / drivers / md / dm-crypt.c
index a1086ee8cccde1828860a24ee8667100e88dd701..d8121234c3471e9a4f1b609e1890f02e92970d59 100644 (file)
@@ -220,7 +220,7 @@ static int crypt_iv_benbi_ctr(struct crypt_config *cc, struct dm_target *ti,
                              const char *opts)
 {
        unsigned int bs = crypto_blkcipher_blocksize(cc->tfm);
-       int log = long_log2(bs);
+       int log = ilog2(bs);
 
        /* we need to calculate how far we must shift the sector count
         * to get the cipher block count, we use this shift in _gen */
@@ -867,7 +867,7 @@ static int crypt_ctr(struct dm_target *ti, unsigned int argc, char **argv)
                goto bad4;
        }
 
-       cc->bs = bioset_create(MIN_IOS, MIN_IOS, 4);
+       cc->bs = bioset_create(MIN_IOS, MIN_IOS);
        if (!cc->bs) {
                ti->error = "Cannot allocate crypt bioset";
                goto bad_bs;
@@ -962,7 +962,7 @@ static int crypt_map(struct dm_target *ti, struct bio *bio,
        atomic_set(&io->pending, 0);
        kcryptd_queue_io(io);
 
-       return 0;
+       return DM_MAPIO_SUBMITTED;
 }
 
 static int crypt_status(struct dm_target *ti, status_type_t type,