Re: [PATCH 2/8] memcg: get rid of mem_cgroup_root_css for !CONFIG_MEMCG

Vladimir Davydov
2015-07-08T15:43:39Z

On Wed, Jul 08, 2015 at 02:27:46PM +0200, Michal Hocko wrote:
> The only user is cgwb_bdi_init and that one depends on
> CONFIG_CGROUP_WRITEBACK which in turn depends on CONFIG_MEMCG
> so it doesn't make much sense to definte an empty stub for
> !CONFIG_MEMCG. Moreover ERR_PTR(-EINVAL) is ugly and would lead
> to runtime crashes if used in unguarded code paths. Better fail
> during compilation.
>
> Signed-off-by: Michal Hocko <mhocko@kernel.org>

Reviewed-by: Vladimir Davydov <vdavydov@parallels.com>