summaryrefslogtreecommitdiffstats
path: root/fs/proc/inode.c
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2014-01-17 23:01:27 +0100
committerRob Herring <robh@kernel.org>2014-01-17 23:01:27 +0100
commit361128fcbf30f590a05c8e8789155364f37367db (patch)
tree7f7973599e286dfd48ea724a5b7fb4bca76b294e /fs/proc/inode.c
parentdevicetree: macb: Document clock properties (diff)
parentdt/bindings: Remove device_type "serial" from marvell,mv64360-mpsc (diff)
downloadlinux-361128fcbf30f590a05c8e8789155364f37367db.tar.xz
linux-361128fcbf30f590a05c8e8789155364f37367db.zip
Merge remote-tracking branch 'grant/devicetree/next' into for-3.14
Diffstat (limited to 'fs/proc/inode.c')
-rw-r--r--fs/proc/inode.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/fs/proc/inode.c b/fs/proc/inode.c
index 28955d4b7218..124fc43c7090 100644
--- a/fs/proc/inode.c
+++ b/fs/proc/inode.c
@@ -292,16 +292,20 @@ proc_reg_get_unmapped_area(struct file *file, unsigned long orig_addr,
{
struct proc_dir_entry *pde = PDE(file_inode(file));
unsigned long rv = -EIO;
- unsigned long (*get_area)(struct file *, unsigned long, unsigned long,
- unsigned long, unsigned long) = NULL;
+
if (use_pde(pde)) {
+ typeof(proc_reg_get_unmapped_area) *get_area;
+
+ get_area = pde->proc_fops->get_unmapped_area;
#ifdef CONFIG_MMU
- get_area = current->mm->get_unmapped_area;
+ if (!get_area)
+ get_area = current->mm->get_unmapped_area;
#endif
- if (pde->proc_fops->get_unmapped_area)
- get_area = pde->proc_fops->get_unmapped_area;
+
if (get_area)
rv = get_area(file, orig_addr, len, pgoff, flags);
+ else
+ rv = orig_addr;
unuse_pde(pde);
}
return rv;