diff options
Diffstat (limited to 'mm/memcontrol.c')
-rw-r--r-- | mm/memcontrol.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 1695f38630f1..e8166521a474 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -6012,6 +6012,9 @@ int mem_cgroup_try_charge_swap(struct page *page, swp_entry_t entry) if (!memcg) return 0; + if (!entry.val) + return 0; + memcg = mem_cgroup_id_get_online(memcg); if (!mem_cgroup_is_root(memcg) && |