aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2010-01-15 20:01:35 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2010-01-16 15:15:40 -0500
commitefc1a3b16930c41d64ffefde16b87d82f603a8a0 (patch)
tree1f651e22f534f1b3eacd2fab97e9351aa75abd0b /mm
parent779c10232ceb11c1b259232c4845cfb2850287b7 (diff)
nommu: don't need get_unmapped_area() for NOMMU
get_unmapped_area() is unnecessary for NOMMU as no-one calls it. Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Al Viro <viro@zeniv.linux.org.uk> Cc: Greg Ungerer <gerg@snapgear.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/nommu.c21
-rw-r--r--mm/util.c2
2 files changed, 1 insertions, 22 deletions
diff --git a/mm/nommu.c b/mm/nommu.c
index d6dd656264a2..32be0cf51ba6 100644
--- a/mm/nommu.c
+++ b/mm/nommu.c
@@ -1761,27 +1761,6 @@ void unmap_mapping_range(struct address_space *mapping,
1761EXPORT_SYMBOL(unmap_mapping_range); 1761EXPORT_SYMBOL(unmap_mapping_range);
1762 1762
1763/* 1763/*
1764 * ask for an unmapped area at which to create a mapping on a file
1765 */
1766unsigned long get_unmapped_area(struct file *file, unsigned long addr,
1767 unsigned long len, unsigned long pgoff,
1768 unsigned long flags)
1769{
1770 unsigned long (*get_area)(struct file *, unsigned long, unsigned long,
1771 unsigned long, unsigned long);
1772
1773 get_area = current->mm->get_unmapped_area;
1774 if (file && file->f_op && file->f_op->get_unmapped_area)
1775 get_area = file->f_op->get_unmapped_area;
1776
1777 if (!get_area)
1778 return -ENOSYS;
1779
1780 return get_area(file, addr, len, pgoff, flags);
1781}
1782EXPORT_SYMBOL(get_unmapped_area);
1783
1784/*
1785 * Check that a process has enough memory to allocate a new virtual 1764 * Check that a process has enough memory to allocate a new virtual
1786 * mapping. 0 means there is enough memory for the allocation to 1765 * mapping. 0 means there is enough memory for the allocation to
1787 * succeed and -ENOMEM implies there is not. 1766 * succeed and -ENOMEM implies there is not.
diff --git a/mm/util.c b/mm/util.c
index 7c35ad95f927..834db7be240f 100644
--- a/mm/util.c
+++ b/mm/util.c
@@ -220,7 +220,7 @@ char *strndup_user(const char __user *s, long n)
220} 220}
221EXPORT_SYMBOL(strndup_user); 221EXPORT_SYMBOL(strndup_user);
222 222
223#ifndef HAVE_ARCH_PICK_MMAP_LAYOUT 223#if defined(CONFIG_MMU) && !defined(HAVE_ARCH_PICK_MMAP_LAYOUT)
224void arch_pick_mmap_layout(struct mm_struct *mm) 224void arch_pick_mmap_layout(struct mm_struct *mm)
225{ 225{
226 mm->mmap_base = TASK_UNMAPPED_BASE; 226 mm->mmap_base = TASK_UNMAPPED_BASE;