]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - mm/huge_memory.c
thp: fix the count of THP_COLLAPSE_ALLOC
[karo-tx-linux.git] / mm / huge_memory.c
index 291bb5bf20a451cf49b29887cb165c387108e6be..8dbc65e08417c231754c971b0a2cae94a4e9b45c 100644 (file)
@@ -1940,9 +1940,9 @@ static void collapse_huge_page(struct mm_struct *mm,
                *hpage = ERR_PTR(-ENOMEM);
                return;
        }
+       count_vm_event(THP_COLLAPSE_ALLOC);
 #endif
 
-       count_vm_event(THP_COLLAPSE_ALLOC);
        if (unlikely(mem_cgroup_newpage_charge(new_page, mm, GFP_KERNEL))) {
 #ifdef CONFIG_NUMA
                put_page(new_page);