aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/block
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2019-11-14 15:34:36 +0100
committerJens Axboe <axboe@kernel.dk>2019-11-14 07:43:59 -0700
commitf0b870df80bc70dad432fd0c142bb709a49964f5 (patch)
treea937171d443f52ec38b6cf3cc6b602a2a6be09fc /drivers/s390/block
parentblock: fix bdev_disk_changed for non-partitioned devices (diff)
downloadlinux-dev-f0b870df80bc70dad432fd0c142bb709a49964f5.tar.xz
linux-dev-f0b870df80bc70dad432fd0c142bb709a49964f5.zip
block: remove (__)blkdev_reread_part as an exported API
In general drivers should never mess with partition tables directly. Unfortunately s390 and loop do for somewhat historic reasons, but they can use bdev_disk_changed directly instead when we export it as they satisfy the sanity checks we have in __blkdev_reread_part. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Stefan Haberland <sth@linux.ibm.com> [dasd] Reviewed-by: Jan Kara <jack@suse.cz> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/s390/block')
-rw-r--r--drivers/s390/block/dasd_genhd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/s390/block/dasd_genhd.c b/drivers/s390/block/dasd_genhd.c
index 5542d9eadfe0..7d079154f849 100644
--- a/drivers/s390/block/dasd_genhd.c
+++ b/drivers/s390/block/dasd_genhd.c
@@ -116,7 +116,9 @@ int dasd_scan_partitions(struct dasd_block *block)
return -ENODEV;
}
- rc = blkdev_reread_part(bdev);
+ mutex_lock(&bdev->bd_mutex);
+ rc = bdev_disk_changed(bdev, false);
+ mutex_unlock(&bdev->bd_mutex);
if (rc)
DBF_DEV_EVENT(DBF_ERR, block->base,
"scan partitions error, rc %d", rc);