diff options
author | Aaron Tomlin <atomlin@redhat.com> | 2015-11-06 19:28:52 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-11-06 20:50:42 -0500 |
commit | d6669d689f397137381fe6729293e0eba1ef09a8 (patch) | |
tree | 0976e0e7bfa0490b38bd40d90dc7b9a9be535fa2 | |
parent | c62d25556be6c965dc14288e796a576e8e39a7e9 (diff) |
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>
-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) | |||
2413 | 2413 | ||
2414 | static struct page * | 2414 | static struct page * |
2415 | khugepaged_alloc_page(struct page **hpage, gfp_t gfp, struct mm_struct *mm, | 2415 | khugepaged_alloc_page(struct page **hpage, gfp_t gfp, struct mm_struct *mm, |
2416 | struct vm_area_struct *vma, unsigned long address, | 2416 | unsigned long address, int node) |
2417 | int node) | ||
2418 | { | 2417 | { |
2419 | VM_BUG_ON_PAGE(*hpage, *hpage); | 2418 | VM_BUG_ON_PAGE(*hpage, *hpage); |
2420 | 2419 | ||
@@ -2481,8 +2480,7 @@ static bool khugepaged_prealloc_page(struct page **hpage, bool *wait) | |||
2481 | 2480 | ||
2482 | static struct page * | 2481 | static struct page * |
2483 | khugepaged_alloc_page(struct page **hpage, gfp_t gfp, struct mm_struct *mm, | 2482 | khugepaged_alloc_page(struct page **hpage, gfp_t gfp, struct mm_struct *mm, |
2484 | struct vm_area_struct *vma, unsigned long address, | 2483 | unsigned long address, int node) |
2485 | int node) | ||
2486 | { | 2484 | { |
2487 | up_read(&mm->mmap_sem); | 2485 | up_read(&mm->mmap_sem); |
2488 | VM_BUG_ON(!*hpage); | 2486 | VM_BUG_ON(!*hpage); |
@@ -2530,7 +2528,7 @@ static void collapse_huge_page(struct mm_struct *mm, | |||
2530 | __GFP_THISNODE; | 2528 | __GFP_THISNODE; |
2531 | 2529 | ||
2532 | /* release the mmap_sem read lock. */ | 2530 | /* release the mmap_sem read lock. */ |
2533 | new_page = khugepaged_alloc_page(hpage, gfp, mm, vma, address, node); | 2531 | new_page = khugepaged_alloc_page(hpage, gfp, mm, address, node); |
2534 | if (!new_page) | 2532 | if (!new_page) |
2535 | return; | 2533 | return; |
2536 | 2534 | ||