Skip to contentSkip to conversation

cgroup: remove for_each_e_css

PATCH In review Alex Shi 2 participants 2 messages Jan 14, 2020 cgroup

lore
Share & tools
lore

Alex Shi

author
#0 lore raw

PATCH 1/1 cgroup: remove for_each_e_css

After commit 37ff9f8f4742 ("cgroup: make cgroup[_taskset]_migrate() take cgroup_r', No one use this macro.
So it'e better to remove.

---
 kernel/cgroup/cgroup.c | 15 ---------------
 1 file changed, 15 deletions(-)
kernel/cgroup/cgroup.c +0 -15
index 735af8f15f95..7d916ad33e59 100644
@@ -663,21 +663,6 @@ struct cgroup_subsys_state *of_css(struct kernfs_open_file *of)
 		else
 
 /**
- * for_each_e_css - iterate all effective css's of a cgroup
- * @css: the iteration cursor
- * @ssid: the index of the subsystem, CGROUP_SUBSYS_COUNT after reaching the end
- * @cgrp: the target cgroup to iterate css's of
- *
- * Should be called under cgroup_[tree_]mutex.
- */
-#define for_each_e_css(css, ssid, cgrp)					    \
-	for ((ssid) = 0; (ssid) < CGROUP_SUBSYS_COUNT; (ssid)++)	    \
-		if (!((css) = cgroup_e_css_by_mask(cgrp,		    \
-						   cgroup_subsys[(ssid)]))) \
-			;						    \
-		else
-
-/**
  * do_each_subsys_mask - filter for_each_subsys with a bitmask
  * @ss: the iteration cursor
  * @ssid: the index of @ss, CGROUP_SUBSYS_COUNT after reaching the end
Signature · 1 line
1.8.3.1
#1 lore raw

Hi,

https://spinics.net/lists/cgroups/msg23131.html

Thanks,

Quoted 41 lines · Alex Shi

After commit 37ff9f8f4742 ("cgroup: make cgroup[_taskset]_migrate() take cgroup_r', No one use this macro.
So it'e better to remove.

---
 kernel/cgroup/cgroup.c | 15 ---------------
 1 file changed, 15 deletions(-)
kernel/cgroup/cgroup.c +0 -15
index 735af8f15f95..7d916ad33e59 100644
@@ -663,21 +663,6 @@ struct cgroup_subsys_state *of_css(struct kernfs_open_file *of)
 		else
 
 /**
- * for_each_e_css - iterate all effective css's of a cgroup
- * @css: the iteration cursor
- * @ssid: the index of the subsystem, CGROUP_SUBSYS_COUNT after reaching the end
- * @cgrp: the target cgroup to iterate css's of
- *
- * Should be called under cgroup_[tree_]mutex.
- */
-#define for_each_e_css(css, ssid, cgrp)					    \
-	for ((ssid) = 0; (ssid) < CGROUP_SUBSYS_COUNT; (ssid)++)	    \
-		if (!((css) = cgroup_e_css_by_mask(cgrp,		    \
-						   cgroup_subsys[(ssid)]))) \
-			;						    \
-		else
-
-/**
  * do_each_subsys_mask - filter for_each_subsys with a bitmask
  * @ss: the iteration cursor
  * @ssid: the index of @ss, CGROUP_SUBSYS_COUNT after reaching the end