diff options
Diffstat (limited to 'mm')
-rw-r--r-- | mm/memcontrol.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c index f4ede99c8b9b..6c755de385f7 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c | |||
@@ -2429,11 +2429,11 @@ int mem_cgroup_prepare_migration(struct page *page, struct mem_cgroup **ptr) | |||
2429 | } | 2429 | } |
2430 | unlock_page_cgroup(pc); | 2430 | unlock_page_cgroup(pc); |
2431 | 2431 | ||
2432 | *ptr = mem; | ||
2432 | if (mem) { | 2433 | if (mem) { |
2433 | ret = __mem_cgroup_try_charge(NULL, GFP_KERNEL, &mem, false); | 2434 | ret = __mem_cgroup_try_charge(NULL, GFP_KERNEL, ptr, false); |
2434 | css_put(&mem->css); | 2435 | css_put(&mem->css); |
2435 | } | 2436 | } |
2436 | *ptr = mem; | ||
2437 | return ret; | 2437 | return ret; |
2438 | } | 2438 | } |
2439 | 2439 | ||