Commit 49177377 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Jens Axboe

dm: open code dm_get_dev_t in dm_init_init

dm_init_init is called from early boot code, and thus lookup_bdev
will never succeed.  Just open code that call to early_lookup_bdev
instead.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarMike Snitzer <snitzer@kernel.org>
Link: https://lore.kernel.org/r/20230531125535.676098-19-hch@lst.deSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 26110d5a
...@@ -293,8 +293,10 @@ static int __init dm_init_init(void) ...@@ -293,8 +293,10 @@ static int __init dm_init_init(void)
for (i = 0; i < ARRAY_SIZE(waitfor); i++) { for (i = 0; i < ARRAY_SIZE(waitfor); i++) {
if (waitfor[i]) { if (waitfor[i]) {
dev_t dev;
DMINFO("waiting for device %s ...", waitfor[i]); DMINFO("waiting for device %s ...", waitfor[i]);
while (!dm_get_dev_t(waitfor[i])) while (early_lookup_bdev(waitfor[i], &dev))
fsleep(5000); fsleep(5000);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment