Skip to content

Commit

Permalink
blk-crypto: use bio_kmalloc in blk_crypto_clone_bio
Browse files Browse the repository at this point in the history
Use bio_kmalloc instead of open coding it.

Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: Eric Biggers <[email protected]>
Reviewed-by: Johannes Thumshirn <[email protected]>
Reviewed-by: Chaitanya Kulkarni <[email protected]>
Acked-by: Damien Le Moal <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
Christoph Hellwig authored and axboe committed Jan 27, 2021
1 parent 616c6a6 commit 4eb1d68
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion block/blk-crypto-fallback.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ static struct bio *blk_crypto_clone_bio(struct bio *bio_src)
struct bio_vec bv;
struct bio *bio;

bio = bio_alloc_bioset(GFP_NOIO, bio_segments(bio_src), NULL);
bio = bio_kmalloc(GFP_NOIO, bio_segments(bio_src));
if (!bio)
return NULL;
bio->bi_bdev = bio_src->bi_bdev;
Expand Down

0 comments on commit 4eb1d68

Please sign in to comment.