[PATCH] Hugetlb: Remove duplicate i_size check

cleanup

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Adam Litke <agl@us.ibm.com>
Cc: William Lee Irwin III <wli@holomorphy.com>
Cc: "Seth, Rohit" <rohit.seth@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
Adam Litke 2006-01-06 00:10:40 -08:00 committed by Linus Torvalds
parent f6b3ec238d
commit f0916794f0
1 changed files with 0 additions and 7 deletions

View File

@ -350,19 +350,12 @@ static struct page *find_lock_huge_page(struct address_space *mapping,
{ {
struct page *page; struct page *page;
int err; int err;
struct inode *inode = mapping->host;
unsigned long size;
retry: retry:
page = find_lock_page(mapping, idx); page = find_lock_page(mapping, idx);
if (page) if (page)
goto out; 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)) if (hugetlb_get_quota(mapping))
goto out; goto out;
page = alloc_huge_page(); page = alloc_huge_page();