block: fix bounce_clone_bio for passthrough bios
authorChristoph Hellwig <hch@lst.de>
Wed, 24 Feb 2021 07:24:05 +0000 (08:24 +0100)
committerJens Axboe <axboe@kernel.dk>
Wed, 24 Feb 2021 15:55:00 +0000 (08:55 -0700)
commitb90994c6ab623baf9268df9710692f14920ce9d2
tree0b660d261f3f35cefad27fa700025fb4ba770a18
parent5407334c53e9922c1c3fb28801e489d0b74f2c8d
block: fix bounce_clone_bio for passthrough bios

Now that bio_alloc_bioset does not fall back to kmalloc for a NULL
bio_set, handle that case explicitly and simplify the calling
conventions.

Based on an earlier patch from Chaitanya Kulkarni.

Fixes: 3175199ab0ac ("block: split bio_kmalloc from bio_alloc_bioset")
Reported-by: Chaitanya Kulkarni <Chaitanya.Kulkarni@wdc.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/bounce.c