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>
这个提交包含在:
@@ -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)
|
||||
|
在新工单中引用
屏蔽一个用户