]> www.infradead.org Git - users/hch/block.git/commitdiff
block: remove the revalidate_disk method block-revalidate-cleanup
authorChristoph Hellwig <hch@lst.de>
Sat, 29 Aug 2020 17:20:37 +0000 (19:20 +0200)
committerChristoph Hellwig <hch@lst.de>
Wed, 3 Mar 2021 17:04:20 +0000 (18:04 +0100)
No implementations left.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Documentation/filesystems/locking.rst
fs/block_dev.c
include/linux/blkdev.h

index b7dcc86c92a45f5ed47cd17cbc5a8b82855927c2..9774e92e449fbd9c182695dc52af0a24e427145c 100644 (file)
@@ -469,7 +469,6 @@ prototypes::
        int (*direct_access) (struct block_device *, sector_t, void **,
                                unsigned long *);
        void (*unlock_native_capacity) (struct gendisk *);
-       int (*revalidate_disk) (struct gendisk *);
        int (*getgeo)(struct block_device *, struct hd_geometry *);
        void (*swap_slot_free_notify) (struct block_device *, unsigned long);
 
@@ -484,7 +483,6 @@ ioctl:                      no
 compat_ioctl:          no
 direct_access:         no
 unlock_native_capacity:        no
-revalidate_disk:       no
 getgeo:                        no
 swap_slot_free_notify: no      (see below)
 ======================= ===================
index 4aa1f88d5bf8b390db16fab9d8999f0c9200b588..dfde8c052bc7553e4a8d87094c1290346e1bf30d 100644 (file)
@@ -1246,14 +1246,10 @@ rescan:
         * below to get the sane behavior for most device while not breaking
         * userspace for this particular setup.
         */
-       if (invalidate) {
-               if (disk_part_scan_enabled(disk) ||
-                   !(disk->flags & GENHD_FL_REMOVABLE))
-                       set_capacity(disk, 0);
-       } else {
-               if (disk->fops->revalidate_disk)
-                       disk->fops->revalidate_disk(disk);
-       }
+       if (invalidate &&
+           (disk_part_scan_enabled(disk) ||
+            !(disk->flags & GENHD_FL_REMOVABLE)))
+               set_capacity(disk, 0);
 
        if (get_capacity(disk)) {
                ret = blk_add_partitions(disk, bdev);
index c032cfe133c792b7b05a8aa31f47b31f6d286356..c473f6f867bb00fb6c47553b0c99ca25f1dd1790 100644 (file)
@@ -1872,7 +1872,6 @@ struct block_device_operations {
        unsigned int (*check_events) (struct gendisk *disk,
                                      unsigned int clearing);
        void (*unlock_native_capacity) (struct gendisk *);
-       int (*revalidate_disk) (struct gendisk *);
        int (*getgeo)(struct block_device *, struct hd_geometry *);
        int (*set_read_only)(struct block_device *bdev, bool ro);
        /* this callback is with swap_lock and sometimes page table lock held */