block: refactor blk_drop_partitions
authorChristoph Hellwig <hch@lst.de>
Tue, 6 Apr 2021 06:22:55 +0000 (08:22 +0200)
committerJens Axboe <axboe@kernel.dk>
Thu, 8 Apr 2021 16:24:36 +0000 (10:24 -0600)
commitd3c4a43d9291279c28b26757351a6ab72c110753
tree191523e681fdff315c7e14029ace1a42ce1aaa5e
parent473338be3aaea117a7133720305f240eb7f68951
block: refactor blk_drop_partitions

Move the busy check and disk-wide sync into the only caller, so that
the remainder can be shared with del_gendisk.  Also pass the gendisk
instead of the bdev as that is all that is needed.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20210406062303.811835-5-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk.h
block/genhd.c
block/partitions/core.c
fs/block_dev.c
include/linux/genhd.h