lkml.org 
[lkml]   [2007]   [Apr]   [24]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    FromBenjamin Herrenschmidt <>
    DateTue, 24 Apr 2007 15:33:40 +1000
    Subject[PATCH 12/12] get_unmapped_area doesn't need hugetlbfs hacks anymore
    Remove the hugetlbfs specific hacks in toplevel get_unmapped_area() now
    that all archs and hugetlbfs itself do the right thing for both cases.
    
    Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
    Acked-by: William Irwin <bill.irwin@oracle.com>
    
     mm/mmap.c |   16 ----------------
     1 file changed, 16 deletions(-)
    Index: linux-cell/mm/mmap.c
    ===================================================================
    --- linux-cell.orig/mm/mmap.c	2007-04-12 12:14:46.000000000 +1000
    +++ linux-cell/mm/mmap.c	2007-04-12 12:14:47.000000000 +1000
    @@ -1381,22 +1381,6 @@ get_unmapped_area(struct file *file, uns
     	if (addr & ~PAGE_MASK)
     		return -EINVAL;
     
    -	if (file && is_file_hugepages(file))  {
    -		/*
    -		 * Check if the given range is hugepage aligned, and
    -		 * can be made suitable for hugepages.
    -		 */
    -		ret = prepare_hugepage_range(addr, len, pgoff);
    -	} else {
    -		/*
    -		 * Ensure that a normal request is not falling in a
    -		 * reserved hugepage range.  For some archs like IA-64,
    -		 * there is a separate region for hugepages.
    -		 */
    -		ret = is_hugepage_only_range(current->mm, addr, len);
    -	}
    -	if (ret)
    -		return -EINVAL;
     	return addr;
     }
     
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at  http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at  http://www.tux.org/lkml/
    
    \
     
     \ /
      Last update: 2007-04-24 07:39    [from the cache]
    ©2003-2008