aboutsummaryrefslogtreecommitdiffstats
path: root/mm/hugetlb.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/hugetlb.c')
-rw-r--r--mm/hugetlb.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index 3e52df7c471b..acb864130f80 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -350,19 +350,12 @@ static struct page *find_lock_huge_page(struct address_space *mapping,
350{ 350{
351 struct page *page; 351 struct page *page;
352 int err; 352 int err;
353 struct inode *inode = mapping->host;
354 unsigned long size;
355 353
356retry: 354retry:
357 page = find_lock_page(mapping, idx); 355 page = find_lock_page(mapping, idx);
358 if (page) 356 if (page)
359 goto out; 357 goto out;
360 358
361 /* Check to make sure the mapping hasn't been truncated */
362 size = i_size_read(inode) >> HPAGE_SHIFT;
363 if (idx >= size)
364 goto out;
365
366 if (hugetlb_get_quota(mapping)) 359 if (hugetlb_get_quota(mapping))
367 goto out; 360 goto out;
368 page = alloc_huge_page(); 361 page = alloc_huge_page();