X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=mm%2Ffremap.c;h=0babe118868cee2ab412a8661f2f1eae200bcc8d;hb=5020cac828f9f6c98a685598599a1dc798712005;hp=2f211f50257a7787c0b5bfdc99700ea0e5924ddb;hpb=a91482bdcc2e0f6035702e46f1b99043a0893346;p=linux-2.6.git diff --git a/mm/fremap.c b/mm/fremap.c index 2f211f502..0babe1188 100644 --- a/mm/fremap.c +++ b/mm/fremap.c @@ -57,8 +57,6 @@ static inline void zap_pte(struct mm_struct *mm, struct vm_area_struct *vma, int install_page(struct mm_struct *mm, struct vm_area_struct *vma, unsigned long addr, struct page *page, pgprot_t prot) { - struct inode *inode; - pgoff_t size; int err = -ENOMEM; pte_t *pte; pgd_t *pgd; @@ -79,16 +77,6 @@ int install_page(struct mm_struct *mm, struct vm_area_struct *vma, if (!pte) goto err_unlock; - /* - * This page may have been truncated. Tell the - * caller about it. - */ - err = -EINVAL; - inode = vma->vm_file->f_mapping->host; - size = (i_size_read(inode) + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT; - if (!page->mapping || page->index >= size) - goto err_unlock; - zap_pte(mm, vma, addr, pte); // mm->rss++;