Skip to content

Commit

Permalink
dm: open code dm_get_dev_t in dm_init_init
Browse files Browse the repository at this point in the history
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: Christoph Hellwig <hch@lst.de>
Reviewed-by: Mike Snitzer <snitzer@kernel.org>
Link: https://lore.kernel.org/r/20230531125535.676098-19-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
Christoph Hellwig authored and Jens Axboe committed Jun 5, 2023
1 parent 26110d5 commit 4917737
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/md/dm-init.c
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,10 @@ static int __init dm_init_init(void)

for (i = 0; i < ARRAY_SIZE(waitfor); i++) {
if (waitfor[i]) {
dev_t dev;

DMINFO("waiting for device %s ...", waitfor[i]);
while (!dm_get_dev_t(waitfor[i]))
while (early_lookup_bdev(waitfor[i], &dev))
fsleep(5000);
}
}
Expand Down

0 comments on commit 4917737

Please sign in to comment.