Linux-Fsdevel Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Jens Axboe <axboe@kernel.dk>
Cc: Josef Bacik <josef@toxicpanda.com>,
Dan Williams <dan.j.williams@intel.com>,
dm-devel@redhat.com,
"Martin K. Petersen" <martin.petersen@oracle.com>,
linux-kernel@vger.kernel.org, linux-block@vger.kernel.org,
nbd@other.debian.org, ceph-devel@vger.kernel.org,
virtualization@lists.linux-foundation.org,
linux-raid@vger.kernel.org, linux-nvdimm@lists.01.org,
linux-nvme@lists.infradead.org, linux-scsi@vger.kernel.org,
linux-fsdevel@vger.kernel.org
Subject: [PATCH 9/9] block: remove revalidate_disk()
Date: Tue, 1 Sep 2020 17:57:48 +0200 [thread overview]
Message-ID: <20200901155748.2884-10-hch@lst.de> (raw)
In-Reply-To: <20200901155748.2884-1-hch@lst.de>
Remove the now unused helper.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
drivers/md/md.h | 2 +-
fs/block_dev.c | 19 -------------------
include/linux/genhd.h | 1 -
3 files changed, 1 insertion(+), 21 deletions(-)
diff --git a/drivers/md/md.h b/drivers/md/md.h
index d9c4e6b7e9398d..f9e2ccdd22c478 100644
--- a/drivers/md/md.h
+++ b/drivers/md/md.h
@@ -397,7 +397,7 @@ struct mddev {
* These locks are separate due to conflicting interactions
* with bdev->bd_mutex.
* Lock ordering is:
- * reconfig_mutex -> bd_mutex : e.g. do_md_run -> revalidate_disk
+ * reconfig_mutex -> bd_mutex
* bd_mutex -> open_mutex: e.g. __blkdev_get -> md_open
*/
struct mutex open_mutex;
diff --git a/fs/block_dev.c b/fs/block_dev.c
index 85f013315d48b3..0771836d0220bd 100644
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
@@ -1339,25 +1339,6 @@ void revalidate_disk_size(struct gendisk *disk, bool verbose)
}
EXPORT_SYMBOL(revalidate_disk_size);
-/**
- * revalidate_disk - wrapper for lower-level driver's revalidate_disk call-back
- * @disk: struct gendisk to be revalidated
- *
- * This routine is a wrapper for lower-level driver's revalidate_disk
- * call-backs. It is used to do common pre and post operations needed
- * for all revalidate_disk operations.
- */
-int revalidate_disk(struct gendisk *disk)
-{
- int ret = 0;
-
- if (disk->fops->revalidate_disk)
- ret = disk->fops->revalidate_disk(disk);
- revalidate_disk_size(disk, ret == 0);
- return ret;
-}
-EXPORT_SYMBOL(revalidate_disk);
-
/*
* This routine checks whether a removable media has been changed,
* and invalidates all buffer-cache-entries in that case. This
diff --git a/include/linux/genhd.h b/include/linux/genhd.h
index c340b392452ce6..2cdc41a3fb6a57 100644
--- a/include/linux/genhd.h
+++ b/include/linux/genhd.h
@@ -372,7 +372,6 @@ extern void blk_unregister_region(dev_t devt, unsigned long range);
int register_blkdev(unsigned int major, const char *name);
void unregister_blkdev(unsigned int major, const char *name);
-int revalidate_disk(struct gendisk *disk);
void revalidate_disk_size(struct gendisk *disk, bool verbose);
int check_disk_change(struct block_device *bdev);
int __invalidate_device(struct block_device *bdev, bool kill_dirty);
--
2.28.0
next prev parent reply other threads:[~2020-09-01 15:59 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-01 15:57 Christoph Hellwig
2020-09-01 15:57 ` [PATCH 1/9] Documentation/filesystems/locking.rst: remove an incorrect sentence Christoph Hellwig
2020-09-02 7:22 ` Johannes Thumshirn
2020-09-01 15:57 ` [PATCH 2/9] block: don't clear bd_invalidated in check_disk_size_change Christoph Hellwig
2020-09-01 15:57 ` [PATCH 3/9] block: rename bd_invalidated Christoph Hellwig
2020-09-02 7:23 ` Johannes Thumshirn
2020-09-01 15:57 ` [PATCH 4/9] block: add a new revalidate_disk_size helper Christoph Hellwig
2020-09-02 6:06 ` Song Liu
2020-09-02 7:23 ` Johannes Thumshirn
2020-09-01 15:57 ` [PATCH 5/9] block: use revalidate_disk_size in set_capacity_revalidate_and_notify Christoph Hellwig
2020-09-02 7:23 ` Johannes Thumshirn
2020-09-01 15:57 ` [PATCH 6/9] nvme: opencode revalidate_disk in nvme_validate_ns Christoph Hellwig
2020-09-02 7:23 ` Johannes Thumshirn
2020-09-01 15:57 ` [PATCH 7/9] sd: open code revalidate_disk Christoph Hellwig
2020-09-02 7:24 ` Johannes Thumshirn
2020-09-01 15:57 ` [PATCH 8/9] nvdimm: simplify revalidate_disk handling Christoph Hellwig
2020-09-01 15:57 ` Christoph Hellwig [this message]
2020-09-02 5:59 ` [PATCH 9/9] block: remove revalidate_disk() Song Liu
2020-09-02 7:25 ` Johannes Thumshirn
2020-09-01 17:45 ` Josef Bacik
2020-09-02 14:02 ` Jens Axboe
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=20200901155748.2884-10-hch@lst.de \
--to=hch@lst.de \
--cc=axboe@kernel.dk \
--cc=ceph-devel@vger.kernel.org \
--cc=dan.j.williams@intel.com \
--cc=dm-devel@redhat.com \
--cc=josef@toxicpanda.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvdimm@lists.01.org \
--cc=linux-nvme@lists.infradead.org \
--cc=linux-raid@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=nbd@other.debian.org \
--cc=virtualization@lists.linux-foundation.org \
--subject='Re: [PATCH 9/9] block: remove revalidate_disk()' \
/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
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).