diff options
author | Christoph Hellwig <hch@lst.de> | 2021-05-21 07:50:53 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-06-01 07:42:23 -0600 |
commit | 0d1feb72ffd8578f6f167ca15b2096c276c1f6df (patch) | |
tree | 78d9e2e704d8f40f26aa42ebcaa34c18ab87047a /drivers/nvdimm | |
parent | 2e3c73fa0c419f62fd588731be30fb0d1bca9ad6 (diff) | |
download | linux-0d1feb72ffd8578f6f167ca15b2096c276c1f6df.tar.gz |
block: automatically enable GENHD_FL_EXT_DEVT
Automatically set the GENHD_FL_EXT_DEVT flag for all disks allocated
without an explicit number of minors. This is what all new block
drivers should do, so make sure it is the default without boilerplate
code.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Luis Chamberlain <mcgrof@kernel.org>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Link: https://lore.kernel.org/r/20210521055116.1053587-4-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/nvdimm')
-rw-r--r-- | drivers/nvdimm/blk.c | 1 | ||||
-rw-r--r-- | drivers/nvdimm/btt.c | 1 | ||||
-rw-r--r-- | drivers/nvdimm/pmem.c | 1 |
3 files changed, 0 insertions, 3 deletions
diff --git a/drivers/nvdimm/blk.c b/drivers/nvdimm/blk.c index 7b9556291eb1d7..7ba446d224fbb7 100644 --- a/drivers/nvdimm/blk.c +++ b/drivers/nvdimm/blk.c @@ -267,7 +267,6 @@ static int nsblk_attach_disk(struct nd_namespace_blk *nsblk) disk->first_minor = 0; disk->fops = &nd_blk_fops; disk->queue = q; - disk->flags = GENHD_FL_EXT_DEVT; disk->private_data = nsblk; nvdimm_namespace_disk_name(&nsblk->common, disk->disk_name); diff --git a/drivers/nvdimm/btt.c b/drivers/nvdimm/btt.c index 18a267d5073f98..1741a7b0b30f6b 100644 --- a/drivers/nvdimm/btt.c +++ b/drivers/nvdimm/btt.c @@ -1537,7 +1537,6 @@ static int btt_blk_init(struct btt *btt) btt->btt_disk->fops = &btt_fops; btt->btt_disk->private_data = btt; btt->btt_disk->queue = btt->btt_queue; - btt->btt_disk->flags = GENHD_FL_EXT_DEVT; blk_queue_logical_block_size(btt->btt_queue, btt->sector_size); blk_queue_max_hw_sectors(btt->btt_queue, UINT_MAX); diff --git a/drivers/nvdimm/pmem.c b/drivers/nvdimm/pmem.c index ed10a8b66068ae..968b8483c763d9 100644 --- a/drivers/nvdimm/pmem.c +++ b/drivers/nvdimm/pmem.c @@ -477,7 +477,6 @@ static int pmem_attach_disk(struct device *dev, disk->fops = &pmem_fops; disk->queue = q; - disk->flags = GENHD_FL_EXT_DEVT; disk->private_data = pmem; nvdimm_namespace_disk_name(ndns, disk->disk_name); set_capacity(disk, (pmem->size - pmem->pfn_pad - pmem->data_offset) |