]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - kernel/cgroup.c
Merge branch 'for-3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup
[karo-tx-linux.git] / kernel / cgroup.c
index 3f14a1310d239c988850a1240a3601e1c6a6d7f1..eeb7e49946b2364685d0d117cde0401cb3fcd80d 100644 (file)
@@ -2137,11 +2137,11 @@ retry_find_task:
                tsk = tsk->group_leader;
 
        /*
-        * Workqueue threads may acquire PF_THREAD_BOUND and become
+        * Workqueue threads may acquire PF_NO_SETAFFINITY and become
         * trapped in a cpuset, or RT worker may be born in a cgroup
         * with no rt_runtime allocated.  Just say no.
         */
-       if (tsk == kthreadd_task || (tsk->flags & PF_THREAD_BOUND)) {
+       if (tsk == kthreadd_task || (tsk->flags & PF_NO_SETAFFINITY)) {
                ret = -EINVAL;
                rcu_read_unlock();
                goto out_unlock_cgroup;
@@ -5290,55 +5290,6 @@ struct cgroup_subsys_state *css_lookup(struct cgroup_subsys *ss, int id)
 }
 EXPORT_SYMBOL_GPL(css_lookup);
 
-/**
- * css_get_next - lookup next cgroup under specified hierarchy.
- * @ss: pointer to subsystem
- * @id: current position of iteration.
- * @root: pointer to css. search tree under this.
- * @foundid: position of found object.
- *
- * Search next css under the specified hierarchy of rootid. Calling under
- * rcu_read_lock() is necessary. Returns NULL if it reaches the end.
- */
-struct cgroup_subsys_state *
-css_get_next(struct cgroup_subsys *ss, int id,
-            struct cgroup_subsys_state *root, int *foundid)
-{
-       struct cgroup_subsys_state *ret = NULL;
-       struct css_id *tmp;
-       int tmpid;
-       int rootid = css_id(root);
-       int depth = css_depth(root);
-
-       if (!rootid)
-               return NULL;
-
-       BUG_ON(!ss->use_id);
-       WARN_ON_ONCE(!rcu_read_lock_held());
-
-       /* fill start point for scan */
-       tmpid = id;
-       while (1) {
-               /*
-                * scan next entry from bitmap(tree), tmpid is updated after
-                * idr_get_next().
-                */
-               tmp = idr_get_next(&ss->idr, &tmpid);
-               if (!tmp)
-                       break;
-               if (tmp->depth >= depth && tmp->stack[depth] == rootid) {
-                       ret = rcu_dereference(tmp->css);
-                       if (ret) {
-                               *foundid = tmpid;
-                               break;
-                       }
-               }
-               /* continue to scan from next id */
-               tmpid = tmpid + 1;
-       }
-       return ret;
-}
-
 /*
  * get corresponding css from file open on cgroupfs directory
  */