shm_mnt is as longterm as it gets, TYVM...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
52e220d357
commit
ca4e05195d
@ -2615,13 +2615,15 @@ int shmem_fill_super(struct super_block *sb, void *data, int silent)
|
|||||||
* tmpfs instance, limiting inodes to one per page of lowmem;
|
* tmpfs instance, limiting inodes to one per page of lowmem;
|
||||||
* but the internal instance is left unlimited.
|
* but the internal instance is left unlimited.
|
||||||
*/
|
*/
|
||||||
if (!(sb->s_flags & MS_NOUSER)) {
|
if (!(sb->s_flags & MS_KERNMOUNT)) {
|
||||||
sbinfo->max_blocks = shmem_default_max_blocks();
|
sbinfo->max_blocks = shmem_default_max_blocks();
|
||||||
sbinfo->max_inodes = shmem_default_max_inodes();
|
sbinfo->max_inodes = shmem_default_max_inodes();
|
||||||
if (shmem_parse_options(data, sbinfo, false)) {
|
if (shmem_parse_options(data, sbinfo, false)) {
|
||||||
err = -EINVAL;
|
err = -EINVAL;
|
||||||
goto failed;
|
goto failed;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
sb->s_flags |= MS_NOUSER;
|
||||||
}
|
}
|
||||||
sb->s_export_op = &shmem_export_ops;
|
sb->s_export_op = &shmem_export_ops;
|
||||||
sb->s_flags |= MS_NOSEC;
|
sb->s_flags |= MS_NOSEC;
|
||||||
@ -2831,8 +2833,7 @@ int __init shmem_init(void)
|
|||||||
goto out2;
|
goto out2;
|
||||||
}
|
}
|
||||||
|
|
||||||
shm_mnt = vfs_kern_mount(&shmem_fs_type, MS_NOUSER,
|
shm_mnt = kern_mount(&shmem_fs_type);
|
||||||
shmem_fs_type.name, NULL);
|
|
||||||
if (IS_ERR(shm_mnt)) {
|
if (IS_ERR(shm_mnt)) {
|
||||||
error = PTR_ERR(shm_mnt);
|
error = PTR_ERR(shm_mnt);
|
||||||
printk(KERN_ERR "Could not kern_mount tmpfs\n");
|
printk(KERN_ERR "Could not kern_mount tmpfs\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user