Skip to content

Commit b92b530

Browse files
Christoph Hellwigaxboe
authored andcommitted
block: remove check_disk_change
Remove the now unused check_disk_change helper. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent 38a2b55 commit b92b530

2 files changed

Lines changed: 0 additions & 21 deletions

File tree

‎fs/block_dev.c‎

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1368,26 +1368,6 @@ void revalidate_disk_size(struct gendisk *disk, bool verbose)
13681368
}
13691369
EXPORT_SYMBOL(revalidate_disk_size);
13701370

1371-
/*
1372-
* This routine checks whether a removable media has been changed,
1373-
* and invalidates all buffer-cache-entries in that case. This
1374-
* is a relatively slow routine, so we have to try to minimize using
1375-
* it. Thus it is called only upon a 'mount' or 'open'. This
1376-
* is the best way of combining speed and utility, I think.
1377-
* People changing diskettes in the middle of an operation deserve
1378-
* to lose :-)
1379-
*/
1380-
int check_disk_change(struct block_device *bdev)
1381-
{
1382-
if (!bdev_check_media_change(bdev))
1383-
return 0;
1384-
if (bdev->bd_disk->fops->revalidate_disk)
1385-
bdev->bd_disk->fops->revalidate_disk(bdev->bd_disk);
1386-
return 1;
1387-
}
1388-
1389-
EXPORT_SYMBOL(check_disk_change);
1390-
13911371
void bd_set_nr_sectors(struct block_device *bdev, sector_t sectors)
13921372
{
13931373
spin_lock(&bdev->bd_size_lock);

‎include/linux/genhd.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,6 @@ int register_blkdev(unsigned int major, const char *name);
370370
void unregister_blkdev(unsigned int major, const char *name);
371371

372372
void revalidate_disk_size(struct gendisk *disk, bool verbose);
373-
int check_disk_change(struct block_device *bdev);
374373
bool bdev_check_media_change(struct block_device *bdev);
375374
int __invalidate_device(struct block_device *bdev, bool kill_dirty);
376375
void bd_set_nr_sectors(struct block_device *bdev, sector_t sectors);

0 commit comments

Comments
 (0)