rtc: hctosys: use function name in the error log
[linux-2.6-block.git] / kernel / cgroup.c
index 29a7b2cc593e3f50a425f1dbbf187d5d1fb4542f..469dd547770ca352fe5aae2f22c689366b721c26 100644 (file)
@@ -3806,10 +3806,7 @@ static void *pidlist_allocate(int count)
 
 static void pidlist_free(void *p)
 {
-       if (is_vmalloc_addr(p))
-               vfree(p);
-       else
-               kfree(p);
+       kvfree(p);
 }
 
 /*
@@ -4199,7 +4196,9 @@ static void *cgroup_pidlist_next(struct seq_file *s, void *v, loff_t *pos)
 
 static int cgroup_pidlist_show(struct seq_file *s, void *v)
 {
-       return seq_printf(s, "%d\n", *(int *)v);
+       seq_printf(s, "%d\n", *(int *)v);
+
+       return 0;
 }
 
 static u64 cgroup_read_notify_on_release(struct cgroup_subsys_state *css,
@@ -5040,6 +5039,9 @@ int __init cgroup_init(void)
                        WARN_ON(cgroup_add_dfl_cftypes(ss, ss->dfl_cftypes));
                        WARN_ON(cgroup_add_legacy_cftypes(ss, ss->legacy_cftypes));
                }
+
+               if (ss->bind)
+                       ss->bind(init_css_set.subsys[ssid]);
        }
 
        cgroup_kobj = kobject_create_and_add("cgroup", fs_kobj);
@@ -5451,7 +5453,7 @@ struct cgroup_subsys_state *css_tryget_online_from_dir(struct dentry *dentry,
 struct cgroup_subsys_state *css_from_id(int id, struct cgroup_subsys *ss)
 {
        WARN_ON_ONCE(!rcu_read_lock_held());
-       return idr_find(&ss->css_idr, id);
+       return id > 0 ? idr_find(&ss->css_idr, id) : NULL;
 }
 
 #ifdef CONFIG_CGROUP_DEBUG