aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/proc/inode.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/fs/proc/inode.c b/fs/proc/inode.c
index 6c501c4d996d..8eaa1ba793fc 100644
--- a/fs/proc/inode.c
+++ b/fs/proc/inode.c
@@ -289,9 +289,13 @@ static unsigned long proc_reg_get_unmapped_area(struct file *file, unsigned long
289{ 289{
290 struct proc_dir_entry *pde = PDE(file_inode(file)); 290 struct proc_dir_entry *pde = PDE(file_inode(file));
291 unsigned long rv = -EIO; 291 unsigned long rv = -EIO;
292 unsigned long (*get_unmapped_area)(struct file *, unsigned long, unsigned long, unsigned long, unsigned long); 292 unsigned long (*get_unmapped_area)(struct file *, unsigned long, unsigned long, unsigned long, unsigned long) = NULL;
293 if (use_pde(pde)) { 293 if (use_pde(pde)) {
294 get_unmapped_area = pde->proc_fops->get_unmapped_area; 294#ifdef CONFIG_MMU
295 get_unmapped_area = current->mm->get_unmapped_area;
296#endif
297 if (pde->proc_fops->get_unmapped_area)
298 get_unmapped_area = pde->proc_fops->get_unmapped_area;
295 if (get_unmapped_area) 299 if (get_unmapped_area)
296 rv = get_unmapped_area(file, orig_addr, len, pgoff, flags); 300 rv = get_unmapped_area(file, orig_addr, len, pgoff, flags);
297 unuse_pde(pde); 301 unuse_pde(pde);