forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Like do_mount, but takes a kernel pointer for the destination path. Switch over the mounts in the init code and devtmpfs to it, which just happen to work due to the implicit set_fs(KERNEL_DS) during early init right now. Signed-off-by: Christoph Hellwig <[email protected]>
- Loading branch information
Christoph Hellwig
committed
Jul 31, 2020
1 parent
09cbcec
commit c60166f
Showing
9 changed files
with
46 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// SPDX-License-Identifier: GPL-2.0 | ||
/* | ||
* Routines that mimic syscalls, but don't use the user address space or file | ||
* descriptors. Only for init/ and related early init code. | ||
*/ | ||
#include <linux/init.h> | ||
#include <linux/mount.h> | ||
#include <linux/namei.h> | ||
#include <linux/fs.h> | ||
#include <linux/init_syscalls.h> | ||
#include "internal.h" | ||
|
||
int __init init_mount(const char *dev_name, const char *dir_name, | ||
const char *type_page, unsigned long flags, void *data_page) | ||
{ | ||
struct path path; | ||
int ret; | ||
|
||
ret = kern_path(dir_name, LOOKUP_FOLLOW, &path); | ||
if (ret) | ||
return ret; | ||
ret = path_mount(dev_name, &path, type_page, flags, data_page); | ||
path_put(&path); | ||
return ret; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/* SPDX-License-Identifier: GPL-2.0 */ | ||
|
||
int __init init_mount(const char *dev_name, const char *dir_name, | ||
const char *type_page, unsigned long flags, void *data_page); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters