init: add an init_dup helper
authorChristoph Hellwig <hch@lst.de>
Tue, 28 Jul 2020 15:49:47 +0000 (17:49 +0200)
committerAl Viro <viro@zeniv.linux.org.uk>
Wed, 5 Aug 2020 01:02:38 +0000 (21:02 -0400)
commitf073531070d24bbb82cb2658952d949f4851024b
tree064d6a4ec00df1fe854f6266e6e14432126ca2c8
parent235e57935bf328c4cce371ffc4dd1d8fab4885cd
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>
fs/init.c
include/linux/init_syscalls.h
init/main.c