On Sun, May 23, 2021 at 09:46:01AM +0200, Hannes Reinecke wrote:
> ... and also fixes an issue with GENHD_FL_UP remained set in an error path
> in __device_add_disk().
Well, the error path in __device_add_disk is a complete disaster right
now, but Luis is looking into it fortunately.
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 5/21/21 7:50 AM, Christoph Hellwig wrote:
Untangle the mess around blk_alloc_devt by moving the check for
the used allocation scheme into the callers.
Signed-off-by: Christoph Hellwig
---
block/blk.h | 4 +-
block/genhd.c | 96 ---
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
Untangle the mess around blk_alloc_devt by moving the check for
the used allocation scheme into the callers.
Signed-off-by: Christoph Hellwig
---
block/blk.h | 4 +-
block/genhd.c | 96 -
block/partitions/core.c | 15 +--
3 files