]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - glsdk/meta-ti-glsdk.git/blob - recipes-kernel/linux/linux-omap-psp-2.6.32/0001-cgroupfs-create-sys-fs-cgroup-to-mount-cgroupfs-on.patch
move kernel recipes in to the proper dir
[glsdk/meta-ti-glsdk.git] / recipes-kernel / linux / linux-omap-psp-2.6.32 / 0001-cgroupfs-create-sys-fs-cgroup-to-mount-cgroupfs-on.patch
1 From 787c524fc478068d18eef72f43074b47722e50b0 Mon Sep 17 00:00:00 2001
2 From: Greg KH <gregkh@suse.de>
3 Date: Thu, 5 Aug 2010 13:53:35 -0700
4 Subject: [PATCH] cgroupfs: create /sys/fs/cgroup to mount cgroupfs on
6 We really shouldn't be asking userspace to create new root filesystems.
7 So follow along with all of the other in-kernel filesystems, and provide
8 a mount point in sysfs.
10 For cgroupfs, this should be in /sys/fs/cgroup/  This change provides
11 that mount point when the cgroup filesystem is registered in the kernel.
13 Acked-by: Paul Menage <menage@google.com>
14 Acked-by: Dhaval Giani <dhaval.giani@gmail.com>
15 Cc: Li Zefan <lizf@cn.fujitsu.com>
16 Cc: Lennart Poettering <lennart@poettering.net>
17 Cc: Kay Sievers <kay.sievers@vrfy.org>
18 Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
19 ---
20  kernel/cgroup.c |   13 ++++++++++++-
21  1 files changed, 12 insertions(+), 1 deletions(-)
23 diff --git a/kernel/cgroup.c b/kernel/cgroup.c
24 index 0249f4b..db21dd8 100644
25 --- a/kernel/cgroup.c
26 +++ b/kernel/cgroup.c
27 @@ -1472,6 +1472,8 @@ static struct file_system_type cgroup_fs_type = {
28         .kill_sb = cgroup_kill_sb,
29  };
30  
31 +static struct kobject *cgroup_kobj;
32 +
33  static inline struct cgroup *__d_cgrp(struct dentry *dentry)
34  {
35         return dentry->d_fsdata;
36 @@ -3283,9 +3285,18 @@ int __init cgroup_init(void)
37         hhead = css_set_hash(init_css_set.subsys);
38         hlist_add_head(&init_css_set.hlist, hhead);
39         BUG_ON(!init_root_id(&rootnode));
40 +
41 +       cgroup_kobj = kobject_create_and_add("cgroup", fs_kobj);
42 +       if (!cgroup_kobj) {
43 +               err = -ENOMEM;
44 +               goto out;
45 +       }
46 +
47         err = register_filesystem(&cgroup_fs_type);
48 -       if (err < 0)
49 +       if (err < 0) {
50 +               kobject_put(cgroup_kobj);
51                 goto out;
52 +       }
53  
54         proc_create("cgroups", 0, NULL, &proc_cgroupstats_operations);
55  
56 -- 
57 1.6.6.1