Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux...
[deliverable/linux.git] / mm / hugetlb.c
index e14a8c79a1eb74cfe75352963a308f8e58c661a2..0a0be33bb1997f9b19d1800e906c97f7e5a18d38 100644 (file)
@@ -127,7 +127,7 @@ static inline struct hugepage_subpool *subpool_inode(struct inode *inode)
 
 static inline struct hugepage_subpool *subpool_vma(struct vm_area_struct *vma)
 {
-       return subpool_inode(vma->vm_file->f_dentry->d_inode);
+       return subpool_inode(file_inode(vma->vm_file));
 }
 
 /*
@@ -2479,7 +2479,7 @@ static int unmap_ref_private(struct mm_struct *mm, struct vm_area_struct *vma,
        address = address & huge_page_mask(h);
        pgoff = ((address - vma->vm_start) >> PAGE_SHIFT) +
                        vma->vm_pgoff;
-       mapping = vma->vm_file->f_dentry->d_inode->i_mapping;
+       mapping = file_inode(vma->vm_file)->i_mapping;
 
        /*
         * Take the mapping lock for the duration of the table walk. As
@@ -2920,14 +2920,14 @@ follow_huge_pud(struct mm_struct *mm, unsigned long address,
        return NULL;
 }
 
-int follow_hugetlb_page(struct mm_struct *mm, struct vm_area_struct *vma,
-                       struct page **pages, struct vm_area_struct **vmas,
-                       unsigned long *position, int *length, int i,
-                       unsigned int flags)
+long follow_hugetlb_page(struct mm_struct *mm, struct vm_area_struct *vma,
+                        struct page **pages, struct vm_area_struct **vmas,
+                        unsigned long *position, unsigned long *nr_pages,
+                        long i, unsigned int flags)
 {
        unsigned long pfn_offset;
        unsigned long vaddr = *position;
-       int remainder = *length;
+       unsigned long remainder = *nr_pages;
        struct hstate *h = hstate_vma(vma);
 
        spin_lock(&mm->page_table_lock);
@@ -2997,7 +2997,7 @@ same_page:
                }
        }
        spin_unlock(&mm->page_table_lock);
-       *length = remainder;
+       *nr_pages = remainder;
        *position = vaddr;
 
        return i ? i : -EFAULT;
This page took 0.027027 seconds and 5 git commands to generate.