summaryrefslogtreecommitdiff
path: root/init/do_mounts_initrd.c
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2018-10-23 23:41:09 +0300
committerDominik Brodowski <linux@dominikbrodowski.net>2019-12-12 16:50:05 +0300
commitcccaa5e33525fc07f4a2ce0518e50b9ddf435e47 (patch)
tree841730eb8a627568c8d8b75eef0621c4cf3d900d /init/do_mounts_initrd.c
parentd4440aac83d12f87df9bcc51e992b9c28c7f4fa5 (diff)
downloadlinux-cccaa5e33525fc07f4a2ce0518e50b9ddf435e47.tar.xz
init: use do_mount() instead of ksys_mount()
In prepare_namespace(), do_mount() can be used instead of ksys_mount() as the first and third argument are const strings in the kernel, the second and fourth argument are passed through anyway, and the fifth argument is NULL. In do_mount_root(), ksys_mount() is called with the first and third argument being already kernelspace strings, which do not need to be copied over from userspace to kernelspace (again). The second and fourth arguments are passed through to do_mount() anyway. The fifth argument, while already residing in kernelspace, needs to be put into a page of its own. Then, do_mount() can be used instead of ksys_mount(). Once this is done, there are no in-kernel users to ksys_mount() left, which can therefore be removed. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'init/do_mounts_initrd.c')
0 files changed, 0 insertions, 0 deletions