mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-29 05:44:11 +00:00
block: fix rootwait=
Failures to look up the gendisk must return -ENODEV so that rootwait
retries the lookup instead of -EINVAL which exits early.
Fixes: cf056a4312
("init: improve the name_to_dev_t interface")
Reported-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Tested-by: Fabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/20230607135746.92995-1-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
3d2af77e31
commit
1341c7d2cc
1 changed files with 2 additions and 2 deletions
|
@ -181,7 +181,7 @@ static int __init devt_from_devname(const char *name, dev_t *devt)
|
||||||
*p = '\0';
|
*p = '\0';
|
||||||
*devt = blk_lookup_devt(s, part);
|
*devt = blk_lookup_devt(s, part);
|
||||||
if (*devt)
|
if (*devt)
|
||||||
return 0;
|
return -ENODEV;
|
||||||
|
|
||||||
/* try disk name without p<part number> */
|
/* try disk name without p<part number> */
|
||||||
if (p < s + 2 || !isdigit(p[-2]) || p[-1] != 'p')
|
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);
|
*devt = blk_lookup_devt(s, part);
|
||||||
if (*devt)
|
if (*devt)
|
||||||
return 0;
|
return 0;
|
||||||
return -EINVAL;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int __init devt_from_devnum(const char *name, dev_t *devt)
|
static int __init devt_from_devnum(const char *name, dev_t *devt)
|
||||||
|
|
Loading…
Reference in a new issue