summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2021-04-06 08:22:52 +0200
committerJens Axboe <axboe@kernel.dk>2021-04-08 18:24:36 +0200
commitb896fa85e0ee4f09ba4be48a3f405fc82c38afb4 (patch)
tree4499d5960d62938852ab1701e3077f0262f4f0e0 /drivers
parentblk-zoned: Remove the definition of blk_zone_start() (diff)
downloadlinux-b896fa85e0ee4f09ba4be48a3f405fc82c38afb4.tar.xz
linux-b896fa85e0ee4f09ba4be48a3f405fc82c38afb4.zip
dasd: use bdev_disk_changed instead of blk_drop_partitions
Use the more general interface - the behavior is the same except that now a change uevent is sent, which is the right thing to do when the device becomes unusable. Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Stefan Haberland <sth@linux.ibm.com> Link: https://lore.kernel.org/r/20210406062303.811835-2-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/s390/block/dasd_genhd.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/s390/block/dasd_genhd.c b/drivers/s390/block/dasd_genhd.c
index a9698fba9b76..8d6587ec73e2 100644
--- a/drivers/s390/block/dasd_genhd.c
+++ b/drivers/s390/block/dasd_genhd.c
@@ -146,12 +146,11 @@ void dasd_destroy_partitions(struct dasd_block *block)
block->bdev = NULL;
mutex_lock(&bdev->bd_mutex);
- blk_drop_partitions(bdev);
+ bdev_disk_changed(bdev, true);
mutex_unlock(&bdev->bd_mutex);
/* Matching blkdev_put to the blkdev_get in dasd_scan_partitions. */
blkdev_put(bdev, FMODE_READ);
- set_capacity(block->gdp, 0);
}
int dasd_gendisk_init(void)