diff --git a/mm/memcontrol.c b/mm/memcontrol.c index b952abef6ff0..a1c05ff5892d 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -2094,7 +2094,8 @@ static int try_charge(struct mem_cgroup *memcg, gfp_t gfp_mask, mem_cgroup_events(mem_over_limit, MEMCG_OOM, 1); - mem_cgroup_oom(mem_over_limit, gfp_mask, get_order(nr_pages)); + mem_cgroup_oom(mem_over_limit, gfp_mask, + get_order(nr_pages * PAGE_SIZE)); nomem: if (!(gfp_mask & __GFP_NOFAIL)) return -ENOMEM;