提交 d5028f9f 编写于 作者: V Vladimir Davydov 提交者: Linus Torvalds

vmscan: fix sane_reclaim helper for legacy memcg

The sane_reclaim() helper is supposed to return false for memcg reclaim
if the legacy hierarchy is used, because the latter lacks dirty
throttling mechanism, and so it did before it was accidentally broken by
commit 33398cf2 ("memcg: export struct mem_cgroup").  Fix it.

Fixes: 33398cf2 ("memcg: export struct mem_cgroup")
Signed-off-by: NVladimir Davydov <vdavydov@parallels.com>
Acked-by: NTejun Heo <tj@kernel.org>
Acked-by: NMichal Hocko <mhocko@suse.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 d046b770
......@@ -175,7 +175,7 @@ static bool sane_reclaim(struct scan_control *sc)
if (!memcg)
return true;
#ifdef CONFIG_CGROUP_WRITEBACK
if (memcg->css.cgroup)
if (cgroup_on_dfl(memcg->css.cgroup))
return true;
#endif
return false;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册