Commit 70516b93 authored by Qian Cai's avatar Qian Cai Committed by Linus Torvalds

mm/huge_memory.c: fix "orig_pud" set but not used

Commit a00cc7d9 ("mm, x86: add support for PUD-sized transparent
hugepages") introduced pudp_huge_get_and_clear_full() but no one uses
its return code.

In order to not diverge from pmdp_huge_get_and_clear_full(), just change
zap_huge_pud() to not assign the return value from
pudp_huge_get_and_clear_full().

  mm/huge_memory.c: In function 'zap_huge_pud':
  mm/huge_memory.c:1982:8: warning: variable 'orig_pud' set but not used [-Wunused-but-set-variable]
    pud_t orig_pud;
          ^~~~~~~~

Link: http://lkml.kernel.org/r/20190301221956.97493-1-cai@lca.pwSigned-off-by: default avatarQian Cai <cai@lca.pw>
Reviewed-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Cc: Matthew Wilcox <willy@infradead.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent cd02cf1a
...@@ -1982,7 +1982,6 @@ spinlock_t *__pud_trans_huge_lock(pud_t *pud, struct vm_area_struct *vma) ...@@ -1982,7 +1982,6 @@ spinlock_t *__pud_trans_huge_lock(pud_t *pud, struct vm_area_struct *vma)
int zap_huge_pud(struct mmu_gather *tlb, struct vm_area_struct *vma, int zap_huge_pud(struct mmu_gather *tlb, struct vm_area_struct *vma,
pud_t *pud, unsigned long addr) pud_t *pud, unsigned long addr)
{ {
pud_t orig_pud;
spinlock_t *ptl; spinlock_t *ptl;
ptl = __pud_trans_huge_lock(pud, vma); ptl = __pud_trans_huge_lock(pud, vma);
...@@ -1994,8 +1993,7 @@ int zap_huge_pud(struct mmu_gather *tlb, struct vm_area_struct *vma, ...@@ -1994,8 +1993,7 @@ int zap_huge_pud(struct mmu_gather *tlb, struct vm_area_struct *vma,
* pgtable_trans_huge_withdraw after finishing pudp related * pgtable_trans_huge_withdraw after finishing pudp related
* operations. * operations.
*/ */
orig_pud = pudp_huge_get_and_clear_full(tlb->mm, addr, pud, pudp_huge_get_and_clear_full(tlb->mm, addr, pud, tlb->fullmm);
tlb->fullmm);
tlb_remove_pud_tlb_entry(tlb, pud, addr); tlb_remove_pud_tlb_entry(tlb, pud, addr);
if (vma_is_dax(vma)) { if (vma_is_dax(vma)) {
spin_unlock(ptl); spin_unlock(ptl);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment