On Fri, May 21, 2021 at 05:16:46PM +, Luis Chamberlain wrote:
> > - /* in consecutive minor range? */
> > - if (bdev->bd_partno < disk->minors) {
> > - *devt = MKDEV(disk->major, disk->first_minor + bdev->bd_partno);
> > - return 0;
> > - }
> > -
>
> It is not obvious
On Fri, May 21, 2021 at 07:50:51AM +0200, Christoph Hellwig wrote:
> diff --git a/block/genhd.c b/block/genhd.c
> index 39ca97b0edc6..2c00bc3261d9 100644
> --- a/block/genhd.c
> +++ b/block/genhd.c
> @@ -335,52 +335,22 @@ static int blk_mangle_minor(int minor)
<-- snip -->
> -int blk_alloc_devt(s