提交 f0916794 编写于 作者: A Adam Litke 提交者: Linus Torvalds

[PATCH] Hugetlb: Remove duplicate i_size check

cleanup
Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
Signed-off-by: NAdam Litke <agl@us.ibm.com>
Cc: William Lee Irwin III <wli@holomorphy.com>
Cc: "Seth, Rohit" <rohit.seth@intel.com>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 f6b3ec23
......@@ -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();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册