diff options
author | Christoph Hellwig <hch@lst.de> | 2019-11-14 15:34:36 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2019-11-14 07:43:59 -0700 |
commit | f0b870df80bc70dad432fd0c142bb709a49964f5 (patch) | |
tree | a937171d443f52ec38b6cf3cc6b602a2a6be09fc /fs/block_dev.c | |
parent | 142fe8f4bb169e8632024d51c64653a8bf140561 (diff) | |
download | linux-next-f0b870df80bc70dad432fd0c142bb709a49964f5.tar.gz |
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 'fs/block_dev.c')
-rw-r--r-- | fs/block_dev.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/block_dev.c b/fs/block_dev.c index ae16466a67f7..9558a2f064b1 100644 --- a/fs/block_dev.c +++ b/fs/block_dev.c @@ -1513,6 +1513,8 @@ int bdev_disk_changed(struct block_device *bdev, bool invalidate) struct gendisk *disk = bdev->bd_disk; int ret; + lockdep_assert_held(&bdev->bd_mutex); + rescan: ret = blk_drop_partitions(disk, bdev); if (ret) @@ -1540,6 +1542,11 @@ rescan: return ret; } +/* + * Only exported for for loop and dasd for historic reasons. Don't use in new + * code! + */ +EXPORT_SYMBOL_GPL(bdev_disk_changed); /* * bd_mutex locking: |