Skip to content

Commit

Permalink
[PATCH] Hugetlb: Remove duplicate i_size check
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Adam Litke authored and Linus Torvalds committed Jan 6, 2006
1 parent f6b3ec2 commit f091679
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions mm/hugetlb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit f091679

Please sign in to comment.