Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d5028f9f authored by Vladimir Davydov's avatar Vladimir Davydov Committed by Linus Torvalds
Browse files

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: default avatarVladimir Davydov <vdavydov@parallels.com>
Acked-by: default avatarTejun Heo <tj@kernel.org>
Acked-by: default avatarMichal Hocko <mhocko@suse.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent d046b770
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;