OSDN Git Service

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)
committerJens Axboe <axboe@kernel.dk>
Mon, 29 Jun 2020 15:09:07 +0000 (09:09 -0600)
commit4ef2c5c2462d59024adfa090af763a33dcff2f1a
tree60b6de95aa04500f7b866f6dea2fad3ed06a459d
parent826f2f48da8c331ac51e1381998d318012d66550
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.

Acked-by: Tejun Heo <tj@kernel.org>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/md/dm.c