mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-27 12:57:53 +00:00
block: clear bio->bi_bdev when putting a bio back in the cache
commit11eb695feb
upstream. This isn't strictly needed in terms of correctness, but it does allow polling to know if the bio has been put already by a different task and hence avoid polling something that we don't need to. Cc: stable@vger.kernel.org Fixes:be4d234d7a
("bio: add allocation cache abstraction") Reviewed-by: Keith Busch <kbusch@kernel.org> Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
3dbd3d1b33
commit
6b6676da6b
1 changed files with 1 additions and 0 deletions
|
@ -773,6 +773,7 @@ static inline void bio_put_percpu_cache(struct bio *bio)
|
|||
|
||||
if ((bio->bi_opf & REQ_POLLED) && !WARN_ON_ONCE(in_interrupt())) {
|
||||
bio->bi_next = cache->free_list;
|
||||
bio->bi_bdev = NULL;
|
||||
cache->free_list = bio;
|
||||
cache->nr++;
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue