]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - mm/memory.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
[karo-tx-linux.git] / mm / memory.c
index bb11c474857e5ff2a3756724ca30139ff41ebbab..cbb57194687e393a16e9e0e74381bfcb2569b720 100644 (file)
@@ -2719,7 +2719,7 @@ int do_swap_page(struct vm_fault *vmf)
                /* Had to read the page from swap area: Major fault */
                ret = VM_FAULT_MAJOR;
                count_vm_event(PGMAJFAULT);
-               mem_cgroup_count_vm_event(vma->vm_mm, PGMAJFAULT);
+               count_memcg_event_mm(vma->vm_mm, PGMAJFAULT);
        } else if (PageHWPoison(page)) {
                /*
                 * hwpoisoned dirty swapcache pages are kept for killing
@@ -3262,14 +3262,14 @@ static int fault_around_bytes_set(void *data, u64 val)
                fault_around_bytes = PAGE_SIZE; /* rounddown_pow_of_two(0) is undefined */
        return 0;
 }
-DEFINE_SIMPLE_ATTRIBUTE(fault_around_bytes_fops,
+DEFINE_DEBUGFS_ATTRIBUTE(fault_around_bytes_fops,
                fault_around_bytes_get, fault_around_bytes_set, "%llu\n");
 
 static int __init fault_around_debugfs(void)
 {
        void *ret;
 
-       ret = debugfs_create_file("fault_around_bytes", 0644, NULL, NULL,
+       ret = debugfs_create_file_unsafe("fault_around_bytes", 0644, NULL, NULL,
                        &fault_around_bytes_fops);
        if (!ret)
                pr_warn("Failed to create fault_around_bytes in debugfs");
@@ -3837,7 +3837,7 @@ int handle_mm_fault(struct vm_area_struct *vma, unsigned long address,
        __set_current_state(TASK_RUNNING);
 
        count_vm_event(PGFAULT);
-       mem_cgroup_count_vm_event(vma->vm_mm, PGFAULT);
+       count_memcg_event_mm(vma->vm_mm, PGFAULT);
 
        /* do counter updates before entering really critical section. */
        check_sync_rss_stat(current);
@@ -4014,8 +4014,6 @@ static int __follow_pte_pmd(struct mm_struct *mm, unsigned long address,
                goto out;
 
        ptep = pte_offset_map_lock(mm, pmd, address, ptlp);
-       if (!ptep)
-               goto out;
        if (!pte_present(*ptep))
                goto unlock;
        *ptepp = ptep;