From mboxrd@z Thu Jan 1 00:00:00 1970 From: Benjamin Herrenschmidt Date: Thu, 22 Mar 2007 17:01:26 +1100 Subject: [RFC/PATCH 10/15] get_unmapped_area handles MAP_FIXED in hugetlbfs In-Reply-To: <1174543217.531981.572863804039.qpush@grosgo> Message-Id: <20070322060300.BBB4ADE3EC@ozlabs.org> Sender: owner-linux-mm@kvack.org Return-Path: To: Linux Memory Management Cc: linux-kernel@vger.kernel.org List-ID: --- fs/hugetlbfs/inode.c | 6 ++++++ 1 file changed, 6 insertions(+) Index: linux-cell/fs/hugetlbfs/inode.c =================================================================== --- linux-cell.orig/fs/hugetlbfs/inode.c 2007-03-22 16:12:56.000000000 +1100 +++ linux-cell/fs/hugetlbfs/inode.c 2007-03-22 16:16:02.000000000 +1100 @@ -115,6 +115,12 @@ hugetlb_get_unmapped_area(struct file *f if (len > TASK_SIZE) return -ENOMEM; + if (flags & MAP_FIXED) { + if (prepare_hugepage_range(addr, len, pgoff)) + return -EINVAL; + return addr; + } + if (addr) { addr = ALIGN(addr, HPAGE_SIZE); vma = find_vma(mm, addr); -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org