init: improve the name_to_dev_t interface
name_to_dev_t has a very misleading name, that doesn't make clear it should only be used by the early init code, and also has a bad calling convention that doesn't allow returning different kinds of errors. Rename it to early_lookup_bdev to make the use case clear, and return an errno, where -EINVAL means the string could not be parsed, and -ENODEV means it the string was valid, but there was no device found for it. Also stub out the whole call for !CONFIG_BLOCK as all the non-block root cases are always covered in the caller. Signed-off-by:Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20230531125535.676098-14-hch@lst.de Signed-off-by:
Jens Axboe <axboe@kernel.dk>
Showing
- Documentation/admin-guide/kernel-parameters.txt 2 additions, 2 deletionsDocumentation/admin-guide/kernel-parameters.txt
- drivers/md/dm-table.c 3 additions, 2 deletionsdrivers/md/dm-table.c
- drivers/md/md-autodetect.c 2 additions, 1 deletiondrivers/md/md-autodetect.c
- drivers/mtd/devices/block2mtd.c 1 addition, 2 deletionsdrivers/mtd/devices/block2mtd.c
- fs/pstore/blk.c 2 additions, 2 deletionsfs/pstore/blk.c
- include/linux/blkdev.h 5 additions, 0 deletionsinclude/linux/blkdev.h
- include/linux/mount.h 0 additions, 1 deletioninclude/linux/mount.h
- init/do_mounts.c 49 additions, 53 deletionsinit/do_mounts.c
- kernel/power/hibernate.c 10 additions, 12 deletionskernel/power/hibernate.c
Loading
Please register or sign in to comment