]> git.proxmox.com Git - mirror_ubuntu-kernels.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)
committerAndrea Righi <andrea.righi@canonical.com>
Tue, 14 Mar 2023 15:47:16 +0000 (16:47 +0100)
commit238ae2f969337dd31e9ffa12fe08deba43298d92
treef793e7e90b56a5a9d0cfac1fd20638f30fca9f10
parent90dc4a51f4e84b8aeb0e19572eb591995093693e
block: clear bio->bi_bdev when putting a bio back in the cache

BugLink: https://bugs.launchpad.net/bugs/2011425
commit 11eb695feb636fa5211067189cad25ac073e7fe5 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: be4d234d7aeb ("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>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
block/bio.c