]> git.baikalelectronics.ru Git - kernel.git/commit
bio: safeguard REQ_ALLOC_CACHE bio put
authorPavel Begunkov <asml.silence@gmail.com>
Tue, 18 Oct 2022 19:50:55 +0000 (20:50 +0100)
committerJens Axboe <axboe@kernel.dk>
Thu, 20 Oct 2022 12:50:29 +0000 (05:50 -0700)
commit1c639006e057e8151263e0df57bf5e903cb060d1
treefb609912c4deb0ac37524b3067c0324b81598d91
parent310ad82562f3eb747f12f2269c719d3de37056fc
bio: safeguard REQ_ALLOC_CACHE bio put

bio_put() with REQ_ALLOC_CACHE assumes that it's executed not from
an irq context. Let's add a warning if the invariant is not respected,
especially since there is a couple of places removing REQ_POLLED by hand
without also clearing REQ_ALLOC_CACHE.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/558d78313476c4e9c233902efa0092644c3d420a.1666122465.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/bio.c