[PATCH 3/3] block: remove the revalidate_disk method

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



No implementations left.

Signed-off-by: Christoph Hellwig <hch@xxxxxx>
---
 Documentation/filesystems/locking.rst |  2 --
 fs/block_dev.c                        | 12 ++++--------
 include/linux/blkdev.h                |  1 -
 3 files changed, 4 insertions(+), 11 deletions(-)

diff --git a/Documentation/filesystems/locking.rst b/Documentation/filesystems/locking.rst
index c0f2c7586531b0..28f611cad54f61 100644
--- a/Documentation/filesystems/locking.rst
+++ b/Documentation/filesystems/locking.rst
@@ -468,7 +468,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);
 
@@ -483,7 +482,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)
 ======================= ===================
diff --git a/fs/block_dev.c b/fs/block_dev.c
index 0b34955b9e360f..2e70585be7171b 100644
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
@@ -1400,14 +1400,10 @@ int bdev_disk_changed(struct block_device *bdev, bool invalidate)
 	 * 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);
 
 	check_disk_size_change(disk, bdev, !invalidate);
 
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 5bd96fbab9b4c8..3d18bfbdb69b07 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -1837,7 +1837,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 *);
 	/* this callback is with swap_lock and sometimes page table lock held */
 	void (*swap_slot_free_notify) (struct block_device *, unsigned long);
-- 
2.28.0




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux