> +void vmpressure_pin_memcg(struct vmpressure *vmpr) > +{ > + struct mem_cgroup *memcg = vmpressure_to_mem_cgroup(vmpr); > + if (memcg != root_mem_cgroup) this check is redundant. see the definition of css_get(): static inline void css_get(struct cgroup_subsys_state *css) { /* We don't need to reference count the root state */ if (!(css->flags & CSS_ROOT)) __css_get(css, 1); } > + css_get(&memcg->css); > +} > + > +void vmpressure_unpin_memcg(struct vmpressure *vmpr) > +{ > + struct mem_cgroup *memcg = vmpressure_to_mem_cgroup(vmpr); > + if (memcg != root_mem_cgroup) ditto > + css_put(&memcg->css); > +} -- To unsubscribe from this list: send the line "unsubscribe cgroups" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html