summaryrefslogtreecommitdiff
path: root/block/blk-map.c
diff options
context:
space:
mode:
authorAnuj Gupta <anuj20.g@samsung.com>2023-01-17 17:36:38 +0530
committerJens Axboe <axboe@kernel.dk>2023-01-29 15:18:34 -0700
commit7e2e355dd9c9031e19b573d2c48171b0418ec552 (patch)
tree6b14f23549a337e7386f6cf2f64850253c82bad3 /block/blk-map.c
parent888545cb43d7639457883dc325c303a3737c0a64 (diff)
block: extend bio-cache for non-polled requests
This patch modifies the present check, so that bio-cache is not limited to iopoll. Signed-off-by: Anuj Gupta <anuj20.g@samsung.com> Signed-off-by: Kanchan Joshi <joshi.k@samsung.com> Link: https://lore.kernel.org/r/20230117120638.72254-3-anuj20.g@samsung.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-map.c')
-rw-r--r--block/blk-map.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/block/blk-map.c b/block/blk-map.c
index 19940c978c73..859590be077e 100644
--- a/block/blk-map.c
+++ b/block/blk-map.c
@@ -246,10 +246,8 @@ static struct bio *blk_rq_map_bio_alloc(struct request *rq,
{
struct bio *bio;
- if (rq->cmd_flags & REQ_POLLED) {
- blk_opf_t opf = rq->cmd_flags | REQ_ALLOC_CACHE;
-
- bio = bio_alloc_bioset(NULL, nr_vecs, opf, gfp_mask,
+ if (rq->cmd_flags & REQ_ALLOC_CACHE) {
+ bio = bio_alloc_bioset(NULL, nr_vecs, rq->cmd_flags, gfp_mask,
&fs_bio_set);
if (!bio)
return NULL;