Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

init: rename mount_block_root to mount_root_generic

mount_block_root is also used to mount non-block file systems, so give
it a better name.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20230531125535.676098-7-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>

authored by

Christoph Hellwig and committed by
Jens Axboe
e3102722 f5524c3f

+5 -5
+3 -3
init/do_mounts.c
··· 391 391 return ret; 392 392 } 393 393 394 - void __init mount_block_root(char *name, int flags) 394 + void __init mount_root_generic(char *name, int flags) 395 395 { 396 396 struct page *page = alloc_page(GFP_KERNEL); 397 397 char *fs_names = page_address(page); ··· 589 589 590 590 if (err < 0) 591 591 pr_emerg("Failed to create /dev/root: %d\n", err); 592 - mount_block_root("/dev/root", root_mountflags); 592 + mount_root_generic("/dev/root", root_mountflags); 593 593 } 594 594 #endif 595 595 } ··· 620 620 root_device_name = saved_root_name; 621 621 if (!strncmp(root_device_name, "mtd", 3) || 622 622 !strncmp(root_device_name, "ubi", 3)) { 623 - mount_block_root(root_device_name, root_mountflags); 623 + mount_root_generic(root_device_name, root_mountflags); 624 624 goto out; 625 625 } 626 626 ROOT_DEV = name_to_dev_t(root_device_name);
+1 -1
init/do_mounts.h
··· 10 10 #include <linux/root_dev.h> 11 11 #include <linux/init_syscalls.h> 12 12 13 - void mount_block_root(char *name, int flags); 13 + void mount_root_generic(char *name, int flags); 14 14 void mount_root(void); 15 15 extern int root_mountflags; 16 16
+1 -1
init/do_mounts_initrd.c
··· 95 95 real_root_dev = new_encode_dev(ROOT_DEV); 96 96 create_dev("/dev/root.old", Root_RAM0); 97 97 /* mount initrd on rootfs' /root */ 98 - mount_block_root("/dev/root.old", root_mountflags & ~MS_RDONLY); 98 + mount_root_generic("/dev/root.old", root_mountflags & ~MS_RDONLY); 99 99 init_mkdir("/old", 0700); 100 100 init_chdir("/old"); 101 101