From 21be6cdc00954b5e5e5842b69ec8e83fb3cb0816 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Tue, 14 Apr 2020 09:28:58 +0200 Subject: dasd: use blk_drop_partitions instead of badly reimplementing it Use the blk_drop_partitions function instead of messing around with ioctls that get kernel pointers. For this blk_drop_partitions needs to be exported, which it normally shouldn't - make an exception for s390 only. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe --- block/partitions/core.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'block/partitions') diff --git a/block/partitions/core.c b/block/partitions/core.c index deccc3fbcd37..8c5295ca8ea6 100644 --- a/block/partitions/core.c +++ b/block/partitions/core.c @@ -624,6 +624,10 @@ int blk_drop_partitions(struct block_device *bdev) return 0; } +#ifdef CONFIG_S390 +/* for historic reasons in the DASD driver */ +EXPORT_SYMBOL_GPL(blk_drop_partitions); +#endif static bool blk_add_partition(struct gendisk *disk, struct block_device *bdev, struct parsed_partitions *state, int p) -- cgit v1.2.3