Merge tag 'mm-stable-2024-05-17-19-19' of git://git.kernel.org/pub/scm/linux/kernel...
[linux-2.6-block.git] / fs / proc / inode.c
index dcd513dccf55cbfa50d5abe965b7a636dcff8353..d19434e2a58e71fdae5e4be075b6976bec260acc 100644 (file)
@@ -451,15 +451,13 @@ pde_get_unmapped_area(struct proc_dir_entry *pde, struct file *file, unsigned lo
                           unsigned long len, unsigned long pgoff,
                           unsigned long flags)
 {
-       typeof_member(struct proc_ops, proc_get_unmapped_area) get_area;
+       if (pde->proc_ops->proc_get_unmapped_area)
+               return pde->proc_ops->proc_get_unmapped_area(file, orig_addr, len, pgoff, flags);
 
-       get_area = pde->proc_ops->proc_get_unmapped_area;
 #ifdef CONFIG_MMU
-       if (!get_area)
-               get_area = current->mm->get_unmapped_area;
+       return mm_get_unmapped_area(current->mm, file, orig_addr, len, pgoff, flags);
 #endif
-       if (get_area)
-               return get_area(file, orig_addr, len, pgoff, flags);
+
        return orig_addr;
 }