[PATCH] Hugetlb: Remove duplicate i_size check
authorAdam Litke <agl@us.ibm.com>
Fri, 6 Jan 2006 08:10:40 +0000 (00:10 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Fri, 6 Jan 2006 16:33:22 +0000 (08:33 -0800)
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>
mm/hugetlb.c

index 3e52df7c471bb944736f8b130058048416a86580..acb864130f807ed69bcda2b624100ba6fb83f2de 100644 (file)
@@ -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();