From: Christoph Hellwig <hch@lst.de>
To: Jens Axboe <axboe@kernel.dk>, Tim Waugh <tim@cyberelk.net>
Cc: linux-block@vger.kernel.org
Subject: [PATCH 3/3] block: remove the revalidate_disk method
Date: Mon, 14 Sep 2020 09:03:37 +0200 [thread overview]
Message-ID: <20200914070337.1578317-4-hch@lst.de> (raw)
In-Reply-To: <20200914070337.1578317-1-hch@lst.de>
No implementations left.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
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
next prev parent reply other threads:[~2020-09-14 7:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-14 7:03 remove ->revalidate_disk Christoph Hellwig
2020-09-14 7:03 ` [PATCH 1/3] paride/pd: " Christoph Hellwig
2020-09-14 7:03 ` [PATCH 2/3] umem: " Christoph Hellwig
2020-09-14 7:03 ` Christoph Hellwig [this message]
2021-03-08 7:45 remove ->revalidate_disk (resend) Christoph Hellwig
2021-03-08 7:45 ` [PATCH 3/3] block: remove the revalidate_disk method Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200914070337.1578317-4-hch@lst.de \
--to=hch@lst.de \
--cc=axboe@kernel.dk \
--cc=linux-block@vger.kernel.org \
--cc=tim@cyberelk.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).