mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
Merge branch 'work.mount0' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull vfs mount updates from Al Viro: "The first part of mount updates. Convert filesystems to use the new mount API" * 'work.mount0' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (63 commits) mnt_init(): call shmem_init() unconditionally constify ksys_mount() string arguments don't bother with registering rootfs init_rootfs(): don't bother with init_ramfs_fs() vfs: Convert smackfs to use the new mount API vfs: Convert selinuxfs to use the new mount API vfs: Convert securityfs to use the new mount API vfs: Convert apparmorfs to use the new mount API vfs: Convert openpromfs to use the new mount API vfs: Convert xenfs to use the new mount API vfs: Convert gadgetfs to use the new mount API vfs: Convert oprofilefs to use the new mount API vfs: Convert ibmasmfs to use the new mount API vfs: Convert qib_fs/ipathfs to use the new mount API vfs: Convert efivarfs to use the new mount API vfs: Convert configfs to use the new mount API vfs: Convert binfmt_misc to use the new mount API convenience helper: get_tree_single() convenience helper get_tree_nodev() vfs: Kill sget_userns() ...
This commit is contained in:
commit
933a90bf4f
60 changed files with 581 additions and 533 deletions
|
|
@ -29,6 +29,7 @@
|
|||
#include <linux/sched/task.h>
|
||||
#include <uapi/linux/mount.h>
|
||||
#include <linux/fs_context.h>
|
||||
#include <linux/shmem_fs.h>
|
||||
|
||||
#include "pnode.h"
|
||||
#include "internal.h"
|
||||
|
|
@ -2788,6 +2789,8 @@ static int do_new_mount(struct path *path, const char *fstype, int sb_flags,
|
|||
err = vfs_parse_fs_string(fc, "source", name, strlen(name));
|
||||
if (!err)
|
||||
err = parse_monolithic_mount_data(fc, data);
|
||||
if (!err && !mount_capable(fc))
|
||||
err = -EPERM;
|
||||
if (!err)
|
||||
err = vfs_get_tree(fc);
|
||||
if (!err)
|
||||
|
|
@ -3295,8 +3298,8 @@ struct dentry *mount_subtree(struct vfsmount *m, const char *name)
|
|||
}
|
||||
EXPORT_SYMBOL(mount_subtree);
|
||||
|
||||
int ksys_mount(char __user *dev_name, char __user *dir_name, char __user *type,
|
||||
unsigned long flags, void __user *data)
|
||||
int ksys_mount(const char __user *dev_name, const char __user *dir_name,
|
||||
const char __user *type, unsigned long flags, void __user *data)
|
||||
{
|
||||
int ret;
|
||||
char *kernel_type;
|
||||
|
|
@ -3687,13 +3690,8 @@ static void __init init_mount_tree(void)
|
|||
struct mount *m;
|
||||
struct mnt_namespace *ns;
|
||||
struct path root;
|
||||
struct file_system_type *type;
|
||||
|
||||
type = get_fs_type("rootfs");
|
||||
if (!type)
|
||||
panic("Can't find rootfs type");
|
||||
mnt = vfs_kern_mount(type, 0, "rootfs", NULL);
|
||||
put_filesystem(type);
|
||||
mnt = vfs_kern_mount(&rootfs_fs_type, 0, "rootfs", NULL);
|
||||
if (IS_ERR(mnt))
|
||||
panic("Can't create rootfs");
|
||||
|
||||
|
|
@ -3746,6 +3744,7 @@ void __init mnt_init(void)
|
|||
fs_kobj = kobject_create_and_add("fs", NULL);
|
||||
if (!fs_kobj)
|
||||
printk(KERN_WARNING "%s: kobj create error\n", __func__);
|
||||
shmem_init();
|
||||
init_rootfs();
|
||||
init_mount_tree();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue