diff options
author | Christoph Hellwig <hch@lst.de> | 2020-09-01 17:57:47 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-09-02 08:00:07 -0600 |
commit | 32f61d67570db036dba9e4fb2509b5343e28f627 (patch) | |
tree | a3bf5ee391913f6946da6c6ef55217006fd8a222 /drivers/nvdimm/blk.c | |
parent | 033a1b98b1f8a823fb0bd985d45290016eee54ce (diff) | |
download | linux-stable-32f61d67570db036dba9e4fb2509b5343e28f627.tar.gz linux-stable-32f61d67570db036dba9e4fb2509b5343e28f627.tar.bz2 linux-stable-32f61d67570db036dba9e4fb2509b5343e28f627.zip |
nvdimm: simplify revalidate_disk handling
The nvdimm block driver abuse revalidate_disk in a strange way, and
totally unrelated to what other drivers do. Simplify this by just
calling nvdimm_revalidate_disk (which seems rather misnamed) from the
probe routines, as the additional bdev size revalidation is pointless
at this point, and remove the revalidate_disk methods given that
it can only be triggered from add_disk, which is right before the
manual calls.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/nvdimm/blk.c')
-rw-r--r-- | drivers/nvdimm/blk.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/nvdimm/blk.c b/drivers/nvdimm/blk.c index 1f718381a045..22e5617b2cea 100644 --- a/drivers/nvdimm/blk.c +++ b/drivers/nvdimm/blk.c @@ -226,7 +226,6 @@ static int nsblk_rw_bytes(struct nd_namespace_common *ndns, static const struct block_device_operations nd_blk_fops = { .owner = THIS_MODULE, .submit_bio = nd_blk_submit_bio, - .revalidate_disk = nvdimm_revalidate_disk, }; static void nd_blk_release_queue(void *q) @@ -284,7 +283,7 @@ static int nsblk_attach_disk(struct nd_namespace_blk *nsblk) set_capacity(disk, available_disk_size >> SECTOR_SHIFT); device_add_disk(dev, disk, NULL); - revalidate_disk(disk); + nvdimm_check_and_set_ro(disk); return 0; } |