summaryrefslogtreecommitdiffstats
path: root/block/partitions/core.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2021-05-21 07:50:53 +0200
committerJens Axboe <axboe@kernel.dk>2021-06-01 07:42:23 -0600
commit0d1feb72ffd8578f6f167ca15b2096c276c1f6df (patch)
tree78d9e2e704d8f40f26aa42ebcaa34c18ab87047a /block/partitions/core.c
parent2e3c73fa0c419f62fd588731be30fb0d1bca9ad6 (diff)
downloadlinux-0d1feb72ffd8578f6f167ca15b2096c276c1f6df.tar.bz2
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 'block/partitions/core.c')
-rw-r--r--block/partitions/core.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/block/partitions/core.c b/block/partitions/core.c
index 504297bdc8bf..ada3e1e66989 100644
--- a/block/partitions/core.c
+++ b/block/partitions/core.c
@@ -326,10 +326,6 @@ static struct block_device *add_partition(struct gendisk *disk, int partno,
const char *dname;
int err;
- /*
- * disk_max_parts() won't be zero, either GENHD_FL_EXT_DEVT is set
- * or 'minors' is passed to alloc_disk().
- */
if (partno >= disk_max_parts(disk))
return ERR_PTR(-EINVAL);