From: Adam Litke Date: Fri, 6 Jan 2006 08:10:40 +0000 (-0800) Subject: [PATCH] Hugetlb: Remove duplicate i_size check X-Git-Tag: v2.6.16-rc1~936^2~276 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=f0916794f00be44154102dedaeafe68b743078a2;p=linux-2.6-omap-h63xx.git [PATCH] Hugetlb: Remove duplicate i_size check cleanup Signed-off-by: David Gibson Signed-off-by: Adam Litke Cc: William Lee Irwin III Cc: "Seth, Rohit" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 3e52df7c471..acb864130f8 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -350,19 +350,12 @@ static struct page *find_lock_huge_page(struct address_space *mapping, { struct page *page; int err; - struct inode *inode = mapping->host; - unsigned long size; retry: page = find_lock_page(mapping, idx); if (page) goto out; - /* Check to make sure the mapping hasn't been truncated */ - size = i_size_read(inode) >> HPAGE_SHIFT; - if (idx >= size) - goto out; - if (hugetlb_get_quota(mapping)) goto out; page = alloc_huge_page();