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 commit33398cf2f3
("memcg: export struct mem_cgroup"). Fix it. Fixes:33398cf2f3
("memcg: export struct mem_cgroup") Signed-off-by: Vladimir Davydov <vdavydov@parallels.com> Acked-by: Tejun Heo <tj@kernel.org> Acked-by: Michal Hocko <mhocko@suse.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
d046b770c9
commit
d5028f9f7d
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue
Block a user