block: don't clear REQ_ALLOC_CACHE for non-polled requests
authorJens Axboe <axboe@kernel.dk>
Fri, 16 Dec 2022 15:20:31 +0000 (08:20 -0700)
committerJens Axboe <axboe@kernel.dk>
Fri, 16 Dec 2022 16:18:09 +0000 (09:18 -0700)
Since commit:

b99182c501c3 ("bio: add pcpu caching for non-polling bio_put")

we support bio caching for IRQ based IO as well, hence there's no need
to manually clear REQ_ALLOC_CACHE if we disable polling on a request.

Reviewed-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
include/linux/bio.h

index b231a665682a3ffab9508425342172f11eb45238..22078a28d7cb1316ddb800bed8c5c28242c8d1ba 100644 (file)
@@ -782,8 +782,7 @@ static inline void bio_set_polled(struct bio *bio, struct kiocb *kiocb)
 
 static inline void bio_clear_polled(struct bio *bio)
 {
-       /* can't support alloc cache if we turn off polling */
-       bio->bi_opf &= ~(REQ_POLLED | REQ_ALLOC_CACHE);
+       bio->bi_opf &= ~REQ_POLLED;
 }
 
 struct bio *blk_next_bio(struct bio *bio, struct block_device *bdev,