diff options
author | Jens Axboe <axboe@kernel.dk> | 2021-08-12 19:42:53 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-08-23 21:45:15 +0200 |
commit | 270a1c913ebd745ebee716af5f7215e1c2b30cc0 (patch) | |
tree | d1cc0c8163721a335687aac07d14a401df439fd2 /block/blk-merge.c | |
parent | block: use the percpu bio cache in __blkdev_direct_IO (diff) | |
download | linux-270a1c913ebd745ebee716af5f7215e1c2b30cc0.tar.xz linux-270a1c913ebd745ebee716af5f7215e1c2b30cc0.zip |
block: provide bio_clear_hipri() helper
Any case that turns off REQ_HIPRI must also clear BIO_PERCPU_CACHE,
as non-polled IO may complete through hard/soft IRQ and hence isn't
safe for our polled bio alloc cache.
Provide a helper that does just that, and use it in the merging code as
well if we split a bio and turn off polling.
Fixes: be863b9e4348 ("block: clear BIO_PERCPU_CACHE flag if polling isn't supported")
Reported-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-merge.c')
-rw-r--r-- | block/blk-merge.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block/blk-merge.c b/block/blk-merge.c index a11b3b53717e..bc25ad409fc1 100644 --- a/block/blk-merge.c +++ b/block/blk-merge.c @@ -285,7 +285,7 @@ split: * iopoll in direct IO routine. Given performance gain of iopoll for * big IO can be trival, disable iopoll when split needed. */ - bio->bi_opf &= ~REQ_HIPRI; + bio_clear_hipri(bio); return bio_split(bio, sectors, GFP_NOIO, bs); } |