diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-06 14:36:30 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-06 14:36:30 -0400 |
commit | ab69bcd66fb4be64edfc767365cb9eb084961246 (patch) | |
tree | f7623585aee58978fc7814460fff517ec39138f2 /kernel/cgroup.c | |
parent | c513b67e68787eceafeede32bcd0edbee45c0006 (diff) | |
parent | 6937e8f8c0135f2325194c372ada6dc655499992 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6: (28 commits)
driver core: device_rename's new_name can be const
sysfs: Remove owner field from sysfs struct attribute
powerpc/pci: Remove owner field from attribute initialization in PCI bridge init
regulator: Remove owner field from attribute initialization in regulator core driver
leds: Remove owner field from attribute initialization in bd2802 driver
scsi: Remove owner field from attribute initialization in ARCMSR driver
scsi: Remove owner field from attribute initialization in LPFC driver
cgroupfs: create /sys/fs/cgroup to mount cgroupfs on
Driver core: Add BUS_NOTIFY_BIND_DRIVER
driver core: fix memory leak on one error path in bus_register()
debugfs: no longer needs to depend on SYSFS
sysfs: Fix one more signature discrepancy between sysfs implementation and docs.
sysfs: fix discrepancies between implementation and documentation
dcdbas: remove a redundant smi_data_buf_free in dcdbas_exit
dmi-id: fix a memory leak in dmi_id_init error path
sysfs: sysfs_chmod_file's attr can be const
firmware: Update hotplug script
Driver core: move platform device creation helpers to .init.text (if MODULE=n)
Driver core: reduce duplicated code for platform_device creation
Driver core: use kmemdup in platform_device_add_resources
...
Diffstat (limited to 'kernel/cgroup.c')
-rw-r--r-- | kernel/cgroup.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/kernel/cgroup.c b/kernel/cgroup.c index a8ce09954404..d83cab06da87 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c | |||
@@ -1623,6 +1623,8 @@ static struct file_system_type cgroup_fs_type = { | |||
1623 | .kill_sb = cgroup_kill_sb, | 1623 | .kill_sb = cgroup_kill_sb, |
1624 | }; | 1624 | }; |
1625 | 1625 | ||
1626 | static struct kobject *cgroup_kobj; | ||
1627 | |||
1626 | static inline struct cgroup *__d_cgrp(struct dentry *dentry) | 1628 | static inline struct cgroup *__d_cgrp(struct dentry *dentry) |
1627 | { | 1629 | { |
1628 | return dentry->d_fsdata; | 1630 | return dentry->d_fsdata; |
@@ -3894,9 +3896,18 @@ int __init cgroup_init(void) | |||
3894 | hhead = css_set_hash(init_css_set.subsys); | 3896 | hhead = css_set_hash(init_css_set.subsys); |
3895 | hlist_add_head(&init_css_set.hlist, hhead); | 3897 | hlist_add_head(&init_css_set.hlist, hhead); |
3896 | BUG_ON(!init_root_id(&rootnode)); | 3898 | BUG_ON(!init_root_id(&rootnode)); |
3899 | |||
3900 | cgroup_kobj = kobject_create_and_add("cgroup", fs_kobj); | ||
3901 | if (!cgroup_kobj) { | ||
3902 | err = -ENOMEM; | ||
3903 | goto out; | ||
3904 | } | ||
3905 | |||
3897 | err = register_filesystem(&cgroup_fs_type); | 3906 | err = register_filesystem(&cgroup_fs_type); |
3898 | if (err < 0) | 3907 | if (err < 0) { |
3908 | kobject_put(cgroup_kobj); | ||
3899 | goto out; | 3909 | goto out; |
3910 | } | ||
3900 | 3911 | ||
3901 | proc_create("cgroups", 0, NULL, &proc_cgroupstats_operations); | 3912 | proc_create("cgroups", 0, NULL, &proc_cgroupstats_operations); |
3902 | 3913 | ||