mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 12:43:29 +02:00
blk-crypto: use bio_kmalloc in blk_crypto_clone_bio
Use bio_kmalloc instead of open coding it. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Eric Biggers <ebiggers@google.com> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com> Acked-by: Damien Le Moal <damien.lemoal@wdc.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
committed by
Jens Axboe
parent
616c6a6884
commit
4eb1d68904
@@ -164,7 +164,7 @@ static struct bio *blk_crypto_clone_bio(struct bio *bio_src)
|
|||||||
struct bio_vec bv;
|
struct bio_vec bv;
|
||||||
struct bio *bio;
|
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)
|
if (!bio)
|
||||||
return NULL;
|
return NULL;
|
||||||
bio->bi_bdev = bio_src->bi_bdev;
|
bio->bi_bdev = bio_src->bi_bdev;
|
||||||
|
Reference in New Issue
Block a user