init: add an init_mknod helper

Add a simple helper to mknod with a kernel space file name and switch
the early init code over to it.  Remove the now unused ksys_mknod.

Signed-off-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
Christoph Hellwig
2020-07-22 11:41:20 +02:00
parent 83ff98c3e9
commit 5fee64fcde
8 changed files with 30 additions and 16 deletions

View File

@@ -1270,15 +1270,6 @@ int compat_ksys_ipc(u32 call, int first, int second,
* The following kernel syscall equivalents are just wrappers to fs-internal
* functions. Therefore, provide stubs to be inlined at the callsites.
*/
extern long do_mknodat(int dfd, const char __user *filename, umode_t mode,
unsigned int dev);
static inline long ksys_mknod(const char __user *filename, umode_t mode,
unsigned int dev)
{
return do_mknodat(AT_FDCWD, filename, mode, dev);
}
extern int do_fchownat(int dfd, const char __user *filename, uid_t user,
gid_t group, int flag);