]> git.baikalelectronics.ru Git - kernel.git/commit
block: clear bio->bi_bdev when putting a bio back in the cache
authorJens Axboe <axboe@kernel.dk>
Fri, 24 Feb 2023 16:59:44 +0000 (09:59 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Mar 2023 08:34:02 +0000 (09:34 +0100)
commit2f8d8a8ddf5c1cffcf63007e7d423966af25863e
tree03b871d965467b32c245d49b56726c1282977632
parent34ff6ed2216029183d823f3af69a327500415676
block: clear bio->bi_bdev when putting a bio back in the cache

commit fa44d6787b2832cd96c1cad15cc135d661a9a629 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: 94b92e98906a ("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>
block/bio.c