diff options
-rw-r--r-- | Documentation/cgroup-v1/rdma.txt | 2 | ||||
-rw-r--r-- | include/linux/cgroup.h | 15 | ||||
-rw-r--r-- | net/core/netclassid_cgroup.c | 1 |
3 files changed, 5 insertions, 13 deletions
diff --git a/Documentation/cgroup-v1/rdma.txt b/Documentation/cgroup-v1/rdma.txt index af618171e0eb..9bdb7fd03f83 100644 --- a/Documentation/cgroup-v1/rdma.txt +++ b/Documentation/cgroup-v1/rdma.txt | |||
@@ -27,7 +27,7 @@ cgroup. | |||
27 | Currently user space applications can easily take away all the rdma verb | 27 | Currently user space applications can easily take away all the rdma verb |
28 | specific resources such as AH, CQ, QP, MR etc. Due to which other applications | 28 | specific resources such as AH, CQ, QP, MR etc. Due to which other applications |
29 | in other cgroup or kernel space ULPs may not even get chance to allocate any | 29 | in other cgroup or kernel space ULPs may not even get chance to allocate any |
30 | rdma resources. This can leads to service unavailability. | 30 | rdma resources. This can lead to service unavailability. |
31 | 31 | ||
32 | Therefore RDMA controller is needed through which resource consumption | 32 | Therefore RDMA controller is needed through which resource consumption |
33 | of processes can be limited. Through this controller different rdma | 33 | of processes can be limited. Through this controller different rdma |
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h index b8bcbdeb2eac..b622d6608605 100644 --- a/include/linux/cgroup.h +++ b/include/linux/cgroup.h | |||
@@ -569,20 +569,11 @@ static inline bool cgroup_is_descendant(struct cgroup *cgrp, | |||
569 | static inline struct cgroup *cgroup_ancestor(struct cgroup *cgrp, | 569 | static inline struct cgroup *cgroup_ancestor(struct cgroup *cgrp, |
570 | int ancestor_level) | 570 | int ancestor_level) |
571 | { | 571 | { |
572 | struct cgroup *ptr; | ||
573 | |||
574 | if (cgrp->level < ancestor_level) | 572 | if (cgrp->level < ancestor_level) |
575 | return NULL; | 573 | return NULL; |
576 | 574 | while (cgrp && cgrp->level > ancestor_level) | |
577 | for (ptr = cgrp; | 575 | cgrp = cgroup_parent(cgrp); |
578 | ptr && ptr->level > ancestor_level; | 576 | return cgrp; |
579 | ptr = cgroup_parent(ptr)) | ||
580 | ; | ||
581 | |||
582 | if (ptr && ptr->level == ancestor_level) | ||
583 | return ptr; | ||
584 | |||
585 | return NULL; | ||
586 | } | 577 | } |
587 | 578 | ||
588 | /** | 579 | /** |
diff --git a/net/core/netclassid_cgroup.c b/net/core/netclassid_cgroup.c index 5e4f04004a49..7bf833598615 100644 --- a/net/core/netclassid_cgroup.c +++ b/net/core/netclassid_cgroup.c | |||
@@ -106,6 +106,7 @@ static int write_classid(struct cgroup_subsys_state *css, struct cftype *cft, | |||
106 | iterate_fd(p->files, 0, update_classid_sock, | 106 | iterate_fd(p->files, 0, update_classid_sock, |
107 | (void *)(unsigned long)cs->classid); | 107 | (void *)(unsigned long)cs->classid); |
108 | task_unlock(p); | 108 | task_unlock(p); |
109 | cond_resched(); | ||
109 | } | 110 | } |
110 | css_task_iter_end(&it); | 111 | css_task_iter_end(&it); |
111 | 112 | ||