diff options
author | Aaron Tomlin <atomlin@redhat.com> | 2015-11-06 16:28:52 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-11-06 17:50:42 -0800 |
commit | d6669d689f397137381fe6729293e0eba1ef09a8 (patch) | |
tree | 0976e0e7bfa0490b38bd40d90dc7b9a9be535fa2 /mm/huge_memory.c | |
parent | c62d25556be6c965dc14288e796a576e8e39a7e9 (diff) | |
download | linux-stable-d6669d689f397137381fe6729293e0eba1ef09a8.tar.gz linux-stable-d6669d689f397137381fe6729293e0eba1ef09a8.tar.bz2 linux-stable-d6669d689f397137381fe6729293e0eba1ef09a8.zip |
thp: remove unused vma parameter from khugepaged_alloc_page
The "vma" parameter to khugepaged_alloc_page() is unused. It has to
remain unused or the drop read lock 'map_sem' optimisation introduce by
commit 8b1645685acf ("mm, THP: don't hold mmap_sem in khugepaged when
allocating THP") wouldn't be safe. So let's remove it.
Signed-off-by: Aaron Tomlin <atomlin@redhat.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/huge_memory.c')
-rw-r--r-- | mm/huge_memory.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/mm/huge_memory.c b/mm/huge_memory.c index dabd247df535..73266ee7274c 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -2413,8 +2413,7 @@ static bool khugepaged_prealloc_page(struct page **hpage, bool *wait) static struct page * khugepaged_alloc_page(struct page **hpage, gfp_t gfp, struct mm_struct *mm, - struct vm_area_struct *vma, unsigned long address, - int node) + unsigned long address, int node) { VM_BUG_ON_PAGE(*hpage, *hpage); @@ -2481,8 +2480,7 @@ static bool khugepaged_prealloc_page(struct page **hpage, bool *wait) static struct page * khugepaged_alloc_page(struct page **hpage, gfp_t gfp, struct mm_struct *mm, - struct vm_area_struct *vma, unsigned long address, - int node) + unsigned long address, int node) { up_read(&mm->mmap_sem); VM_BUG_ON(!*hpage); @@ -2530,7 +2528,7 @@ static void collapse_huge_page(struct mm_struct *mm, __GFP_THISNODE; /* release the mmap_sem read lock. */ - new_page = khugepaged_alloc_page(hpage, gfp, mm, vma, address, node); + new_page = khugepaged_alloc_page(hpage, gfp, mm, address, node); if (!new_page) return; |