diff mbox series

block: don't clear REQ_ALLOC_CACHE for non-polled requests

Message ID ca1e0bf6-b7fa-5505-3682-2cd122b984be@kernel.dk (mailing list archive)
State New, archived
Headers show
Series block: don't clear REQ_ALLOC_CACHE for non-polled requests | expand

Commit Message

Jens Axboe Dec. 16, 2022, 3:22 p.m. UTC
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.

Signed-off-by: Jens Axboe <axboe@kernel.dk>

---

Comments

Keith Busch Dec. 16, 2022, 4:01 p.m. UTC | #1
On Fri, Dec 16, 2022 at 08:22:09AM -0700, Jens Axboe wrote:
> 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.
> 
> Signed-off-by: Jens Axboe <axboe@kernel.dk>

Reviewed-by: Keith Busch <kbusch@kernel.org>
diff mbox series

Patch

diff --git a/include/linux/bio.h b/include/linux/bio.h
index b231a665682a..22078a28d7cb 100644
--- a/include/linux/bio.h
+++ b/include/linux/bio.h
@@ -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,