aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/cgroup.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/cgroup.c')
-rw-r--r--kernel/cgroup.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index 8eb90f25bd7b..391d5e991e5f 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -5033,6 +5033,8 @@ css_get_next(struct cgroup_subsys *ss, int id,
5033 return NULL; 5033 return NULL;
5034 5034
5035 BUG_ON(!ss->use_id); 5035 BUG_ON(!ss->use_id);
5036 WARN_ON_ONCE(!rcu_read_lock_held());
5037
5036 /* fill start point for scan */ 5038 /* fill start point for scan */
5037 tmpid = id; 5039 tmpid = id;
5038 while (1) { 5040 while (1) {
@@ -5040,10 +5042,7 @@ css_get_next(struct cgroup_subsys *ss, int id,
5040 * scan next entry from bitmap(tree), tmpid is updated after 5042 * scan next entry from bitmap(tree), tmpid is updated after
5041 * idr_get_next(). 5043 * idr_get_next().
5042 */ 5044 */
5043 spin_lock(&ss->id_lock);
5044 tmp = idr_get_next(&ss->idr, &tmpid); 5045 tmp = idr_get_next(&ss->idr, &tmpid);
5045 spin_unlock(&ss->id_lock);
5046
5047 if (!tmp) 5046 if (!tmp)
5048 break; 5047 break;
5049 if (tmp->depth >= depth && tmp->stack[depth] == rootid) { 5048 if (tmp->depth >= depth && tmp->stack[depth] == rootid) {