diff options
author | Christoph Hellwig <hch@lst.de> | 2019-11-14 15:34:36 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2019-11-14 15:43:59 +0100 |
commit | f0b870df80bc70dad432fd0c142bb709a49964f5 (patch) | |
tree | a937171d443f52ec38b6cf3cc6b602a2a6be09fc /drivers/s390/block | |
parent | block: fix bdev_disk_changed for non-partitioned devices (diff) | |
download | linux-f0b870df80bc70dad432fd0c142bb709a49964f5.tar.xz linux-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.c | 4 |
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); |