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)
committerMike Snitzer <snitzer@redhat.com>
Wed, 8 Jul 2020 15:02:05 +0000 (11:02 -0400)
commit382761dc6312965a11f82f2217e16ec421bf17ae
treecf35f24dbd82601c538b7544089772e6da231f84
parent85067747cf9888249fa11fa49ef75af5192d3988
dm: use bio_uninit instead of bio_disassociate_blkg

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>
drivers/md/dm.c