diff options
| author | Eric W. Biederman <ebiederm@xmission.com> | 2015-05-13 18:35:41 -0400 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-07-21 13:10:01 -0400 |
| commit | 28dd1f346b2f0fc2ab8285046ed0bd91e9b808d3 (patch) | |
| tree | 7c2a4337b103067684f0345283d19c8e8e62afb2 /kernel | |
| parent | 9924f6e89823a41bfd272ab759636276b9f9ee9c (diff) | |
sysfs: Create mountpoints with sysfs_create_mount_point
commit f9bb48825a6b5d02f4cabcc78967c75db903dcdc upstream.
This allows for better documentation in the code and
it allows for a simpler and fully correct version of
fs_fully_visible to be written.
The mount points converted and their filesystems are:
/sys/hypervisor/s390/ s390_hypfs
/sys/kernel/config/ configfs
/sys/kernel/debug/ debugfs
/sys/firmware/efi/efivars/ efivarfs
/sys/fs/fuse/connections/ fusectl
/sys/fs/pstore/ pstore
/sys/kernel/tracing/ tracefs
/sys/fs/cgroup/ cgroup
/sys/kernel/security/ securityfs
/sys/fs/selinux/ selinuxfs
/sys/fs/smackfs/ smackfs
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/cgroup.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/kernel/cgroup.c b/kernel/cgroup.c index 469dd547770c..e8a5491be756 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c | |||
| @@ -1924,8 +1924,6 @@ static struct file_system_type cgroup_fs_type = { | |||
| 1924 | .kill_sb = cgroup_kill_sb, | 1924 | .kill_sb = cgroup_kill_sb, |
| 1925 | }; | 1925 | }; |
| 1926 | 1926 | ||
| 1927 | static struct kobject *cgroup_kobj; | ||
| 1928 | |||
| 1929 | /** | 1927 | /** |
| 1930 | * task_cgroup_path - cgroup path of a task in the first cgroup hierarchy | 1928 | * task_cgroup_path - cgroup path of a task in the first cgroup hierarchy |
| 1931 | * @task: target task | 1929 | * @task: target task |
| @@ -5044,13 +5042,13 @@ int __init cgroup_init(void) | |||
| 5044 | ss->bind(init_css_set.subsys[ssid]); | 5042 | ss->bind(init_css_set.subsys[ssid]); |
| 5045 | } | 5043 | } |
| 5046 | 5044 | ||
| 5047 | cgroup_kobj = kobject_create_and_add("cgroup", fs_kobj); | 5045 | err = sysfs_create_mount_point(fs_kobj, "cgroup"); |
| 5048 | if (!cgroup_kobj) | 5046 | if (err) |
| 5049 | return -ENOMEM; | 5047 | return err; |
| 5050 | 5048 | ||
| 5051 | err = register_filesystem(&cgroup_fs_type); | 5049 | err = register_filesystem(&cgroup_fs_type); |
| 5052 | if (err < 0) { | 5050 | if (err < 0) { |
| 5053 | kobject_put(cgroup_kobj); | 5051 | sysfs_remove_mount_point(fs_kobj, "cgroup"); |
| 5054 | return err; | 5052 | return err; |
| 5055 | } | 5053 | } |
| 5056 | 5054 | ||
