mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 01:49:46 +00:00
init: add an init_dup helper
Add a simple helper to grab a reference to a file and install it at the next available fd, and switch the early init code over to it. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
committed by
Al Viro
parent
235e57935b
commit
f073531070
@@ -1467,10 +1467,10 @@ void __init console_on_rootfs(void)
|
||||
pr_err("Warning: unable to open an initial console.\n");
|
||||
return;
|
||||
}
|
||||
get_file_rcu_many(file, 2);
|
||||
fd_install(get_unused_fd_flags(0), file);
|
||||
fd_install(get_unused_fd_flags(0), file);
|
||||
fd_install(get_unused_fd_flags(0), file);
|
||||
init_dup(file);
|
||||
init_dup(file);
|
||||
init_dup(file);
|
||||
fput(file);
|
||||
}
|
||||
|
||||
static noinline void __init kernel_init_freeable(void)
|
||||
|
||||
Reference in New Issue
Block a user