]> err.no Git - linux-2.6/blobdiff - include/linux/cgroup.h
Properly notify block layer of sync writes
[linux-2.6] / include / linux / cgroup.h
index 2d1d151258cfcf9b751e5c53bf36e853782cde9e..e155aa78d8594eb545547f48f47c7b53bf9fc36a 100644 (file)
@@ -150,10 +150,10 @@ struct css_set {
        struct kref ref;
 
        /*
-        * List running through all cgroup groups. Protected by
-        * css_set_lock
+        * List running through all cgroup groups in the same hash
+        * slot. Protected by css_set_lock
         */
-       struct list_head list;
+       struct hlist_node hlist;
 
        /*
         * List running through all tasks using this cgroup
@@ -174,7 +174,6 @@ struct css_set {
         * during subsystem registration (at boot time).
         */
        struct cgroup_subsys_state *subsys[CGROUP_SUBSYS_COUNT];
-
 };
 
 /*
@@ -227,6 +226,12 @@ struct cftype {
         */
        int (*read_map) (struct cgroup *cont, struct cftype *cft,
                         struct cgroup_map_cb *cb);
+       /*
+        * read_seq_string() is used for outputting a simple sequence
+        * using seqfile.
+        */
+       int (*read_seq_string) (struct cgroup *cont, struct cftype *cft,
+                        struct seq_file *m);
 
        ssize_t (*write) (struct cgroup *cgrp, struct cftype *cft,
                          struct file *file,
@@ -300,6 +305,12 @@ struct cgroup_subsys {
                        struct cgroup *cgrp);
        void (*post_clone)(struct cgroup_subsys *ss, struct cgroup *cgrp);
        void (*bind)(struct cgroup_subsys *ss, struct cgroup *root);
+       /*
+        * This routine is called with the task_lock of mm->owner held
+        */
+       void (*mm_owner_changed)(struct cgroup_subsys *ss,
+                                       struct cgroup *old,
+                                       struct cgroup *new);
        int subsys_id;
        int active;
        int disabled;
@@ -385,4 +396,13 @@ static inline int cgroupstats_build(struct cgroupstats *stats,
 
 #endif /* !CONFIG_CGROUPS */
 
+#ifdef CONFIG_MM_OWNER
+extern void
+cgroup_mm_owner_callbacks(struct task_struct *old, struct task_struct *new);
+#else /* !CONFIG_MM_OWNER */
+static inline void
+cgroup_mm_owner_callbacks(struct task_struct *old, struct task_struct *new)
+{
+}
+#endif /* CONFIG_MM_OWNER */
 #endif /* _LINUX_CGROUP_H */