diff --git a/block/bio.c b/block/bio.c index 6c470a50a36d9c92641fe341761404ecdb5a04a9..0a14af92373819d6ed25e332ae91c67720d36db9 100644 --- a/block/bio.c +++ b/block/bio.c @@ -741,7 +741,7 @@ void bio_put(struct bio *bio) return; } - if (bio->bi_opf & REQ_ALLOC_CACHE) { + if ((bio->bi_opf & REQ_ALLOC_CACHE) && !WARN_ON_ONCE(in_interrupt())) { struct bio_alloc_cache *cache; bio_uninit(bio);