diff options
Diffstat (limited to 'mm/vmpressure.c')
-rw-r--r-- | mm/vmpressure.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/mm/vmpressure.c b/mm/vmpressure.c index 2a8a736e95cc..13489b1f4ee3 100644 --- a/mm/vmpressure.c +++ b/mm/vmpressure.c | |||
@@ -74,11 +74,6 @@ static struct vmpressure *work_to_vmpressure(struct work_struct *work) | |||
74 | return container_of(work, struct vmpressure, work); | 74 | return container_of(work, struct vmpressure, work); |
75 | } | 75 | } |
76 | 76 | ||
77 | static struct vmpressure *cg_to_vmpressure(struct cgroup *cg) | ||
78 | { | ||
79 | return css_to_vmpressure(cgroup_css(cg, mem_cgroup_subsys_id)); | ||
80 | } | ||
81 | |||
82 | static struct vmpressure *vmpressure_parent(struct vmpressure *vmpr) | 77 | static struct vmpressure *vmpressure_parent(struct vmpressure *vmpr) |
83 | { | 78 | { |
84 | struct cgroup_subsys_state *css = vmpressure_to_css(vmpr); | 79 | struct cgroup_subsys_state *css = vmpressure_to_css(vmpr); |
@@ -283,7 +278,7 @@ void vmpressure_prio(gfp_t gfp, struct mem_cgroup *memcg, int prio) | |||
283 | 278 | ||
284 | /** | 279 | /** |
285 | * vmpressure_register_event() - Bind vmpressure notifications to an eventfd | 280 | * vmpressure_register_event() - Bind vmpressure notifications to an eventfd |
286 | * @cg: cgroup that is interested in vmpressure notifications | 281 | * @css: css that is interested in vmpressure notifications |
287 | * @cft: cgroup control files handle | 282 | * @cft: cgroup control files handle |
288 | * @eventfd: eventfd context to link notifications with | 283 | * @eventfd: eventfd context to link notifications with |
289 | * @args: event arguments (used to set up a pressure level threshold) | 284 | * @args: event arguments (used to set up a pressure level threshold) |
@@ -298,10 +293,11 @@ void vmpressure_prio(gfp_t gfp, struct mem_cgroup *memcg, int prio) | |||
298 | * cftype).register_event, and then cgroup core will handle everything by | 293 | * cftype).register_event, and then cgroup core will handle everything by |
299 | * itself. | 294 | * itself. |
300 | */ | 295 | */ |
301 | int vmpressure_register_event(struct cgroup *cg, struct cftype *cft, | 296 | int vmpressure_register_event(struct cgroup_subsys_state *css, |
302 | struct eventfd_ctx *eventfd, const char *args) | 297 | struct cftype *cft, struct eventfd_ctx *eventfd, |
298 | const char *args) | ||
303 | { | 299 | { |
304 | struct vmpressure *vmpr = cg_to_vmpressure(cg); | 300 | struct vmpressure *vmpr = css_to_vmpressure(css); |
305 | struct vmpressure_event *ev; | 301 | struct vmpressure_event *ev; |
306 | int level; | 302 | int level; |
307 | 303 | ||
@@ -329,7 +325,7 @@ int vmpressure_register_event(struct cgroup *cg, struct cftype *cft, | |||
329 | 325 | ||
330 | /** | 326 | /** |
331 | * vmpressure_unregister_event() - Unbind eventfd from vmpressure | 327 | * vmpressure_unregister_event() - Unbind eventfd from vmpressure |
332 | * @cg: cgroup handle | 328 | * @css: css handle |
333 | * @cft: cgroup control files handle | 329 | * @cft: cgroup control files handle |
334 | * @eventfd: eventfd context that was used to link vmpressure with the @cg | 330 | * @eventfd: eventfd context that was used to link vmpressure with the @cg |
335 | * | 331 | * |
@@ -341,10 +337,11 @@ int vmpressure_register_event(struct cgroup *cg, struct cftype *cft, | |||
341 | * cftype).unregister_event, and then cgroup core will handle everything | 337 | * cftype).unregister_event, and then cgroup core will handle everything |
342 | * by itself. | 338 | * by itself. |
343 | */ | 339 | */ |
344 | void vmpressure_unregister_event(struct cgroup *cg, struct cftype *cft, | 340 | void vmpressure_unregister_event(struct cgroup_subsys_state *css, |
341 | struct cftype *cft, | ||
345 | struct eventfd_ctx *eventfd) | 342 | struct eventfd_ctx *eventfd) |
346 | { | 343 | { |
347 | struct vmpressure *vmpr = cg_to_vmpressure(cg); | 344 | struct vmpressure *vmpr = css_to_vmpressure(css); |
348 | struct vmpressure_event *ev; | 345 | struct vmpressure_event *ev; |
349 | 346 | ||
350 | mutex_lock(&vmpr->events_lock); | 347 | mutex_lock(&vmpr->events_lock); |