Re: rootwait regression in linux-next

From: Christoph Hellwig
Date: Wed Jun 07 2023 - 09:37:39 EST


Hi Fabio,

I guess we need an ENODEV for that last case as well. Please try this
patch:

diff --git a/block/early-lookup.c b/block/early-lookup.c
index 3ff0d2e4dcbfb8..48ea3e982419cc 100644
--- a/block/early-lookup.c
+++ b/block/early-lookup.c
@@ -181,7 +181,7 @@ static int __init devt_from_devname(const char *name, dev_t *devt)
*p = '\0';
*devt = blk_lookup_devt(s, part);
if (*devt)
- return 0;
+ return -ENODEV;

/* try disk name without p<part number> */
if (p < s + 2 || !isdigit(p[-2]) || p[-1] != 'p')
@@ -190,7 +190,7 @@ static int __init devt_from_devname(const char *name, dev_t *devt)
*devt = blk_lookup_devt(s, part);
if (*devt)
return 0;
- return -EINVAL;
+ return -ENODEV;
}

static int __init devt_from_devnum(const char *name, dev_t *devt)