diff options
-rw-r--r-- | mm/page_alloc.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 1c7d90f7a84a..a88cb0cbf352 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -2842,11 +2842,7 @@ retry: nopage: warn_alloc_failed(gfp_mask, order, NULL); - return page; got_pg: - if (kmemcheck_enabled) - kmemcheck_pagealloc_alloc(page, order, gfp_mask); - return page; } @@ -2916,6 +2912,9 @@ retry_cpuset: preferred_zone, classzone_idx, migratetype); } + if (kmemcheck_enabled && page) + kmemcheck_pagealloc_alloc(page, order, gfp_mask); + trace_mm_page_alloc(page, order, alloc_mask, migratetype); out: |