summaryrefslogtreecommitdiffstats
path: root/block/bounce.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2021-03-31 09:30:01 +0200
committerJens Axboe <axboe@kernel.dk>2021-04-06 09:28:18 -0600
commit393bb12e00580aaa23356504eed38d8f5571153a (patch)
treef1dd0bfd89dd25032f06d231bed30767d45a29a6 /block/bounce.c
parent9bb33f24abbd0fa2fadad01ec75438d7cc239189 (diff)
downloadlinux-stable-393bb12e00580aaa23356504eed38d8f5571153a.tar.gz
linux-stable-393bb12e00580aaa23356504eed38d8f5571153a.tar.bz2
linux-stable-393bb12e00580aaa23356504eed38d8f5571153a.zip
block: stop calling blk_queue_bounce for passthrough requests
Instead of overloading the passthrough fast path with the deprecated block layer bounce buffering let the users that combine an old undermaintained driver with a highmem system pay the price by always falling back to copies in that case. Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Martin K. Petersen <martin.petersen@oracle.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Link: https://lore.kernel.org/r/20210331073001.46776-9-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/bounce.c')
-rw-r--r--block/bounce.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/block/bounce.c b/block/bounce.c
index 6bafc0d1f867..94081e013c58 100644
--- a/block/bounce.c
+++ b/block/bounce.c
@@ -180,12 +180,8 @@ static struct bio *bounce_clone_bio(struct bio *bio_src)
* asking for trouble and would force extra work on
* __bio_clone_fast() anyways.
*/
- if (bio_is_passthrough(bio_src))
- bio = bio_kmalloc(GFP_NOIO | __GFP_NOFAIL,
- bio_segments(bio_src));
- else
- bio = bio_alloc_bioset(GFP_NOIO, bio_segments(bio_src),
- &bounce_bio_set);
+ bio = bio_alloc_bioset(GFP_NOIO, bio_segments(bio_src),
+ &bounce_bio_set);
bio->bi_bdev = bio_src->bi_bdev;
if (bio_flagged(bio_src, BIO_REMAPPED))
bio_set_flag(bio, BIO_REMAPPED);
@@ -245,8 +241,7 @@ void __blk_queue_bounce(struct request_queue *q, struct bio **bio_orig)
if (!bounce)
return;
- if (!bio_is_passthrough(*bio_orig) &&
- sectors < bio_sectors(*bio_orig)) {
+ if (sectors < bio_sectors(*bio_orig)) {
bio = bio_split(*bio_orig, sectors, GFP_NOIO, &bounce_bio_split);
bio_chain(bio, *bio_orig);
submit_bio_noacct(*bio_orig);