dm: use bio_uninit instead of bio_disassociate_blkg
authorChristoph Hellwig <hch@lst.de>
Sat, 27 Jun 2020 07:31:46 +0000 (09:31 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Jul 2020 08:19:36 +0000 (10:19 +0200)
commitccf4c300bbd3d2b57cb2507f3699060c998575f9
treeae0d8d158bedd2543ee16da55239861c775b8380
parent020f046a90815b2ce3c9334ccd96911f921fb9ab
dm: use bio_uninit instead of bio_disassociate_blkg

[ Upstream commit 382761dc6312965a11f82f2217e16ec421bf17ae ]

bio_uninit is the proper API to clean up a BIO that has been allocated
on stack or inside a structure that doesn't come from the BIO allocator.
Switch dm to use that instead of bio_disassociate_blkg, which really is
an implementation detail.  Note that the bio_uninit calls are also moved
to the two callers of __send_empty_flush, so that they better pair with
the bio_init calls used to initialize them.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/md/dm.c