linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] userfaultfd: Remove set but not used variable 'vm_alloc_shared'
@ 2021-06-01 14:16 YueHaibing
  0 siblings, 0 replies; only message in thread
From: YueHaibing @ 2021-06-01 14:16 UTC (permalink / raw)
  To: akpm, axelrasmussen; +Cc: linux-mm, linux-kernel, YueHaibing

mm/userfaultfd.c: In function ‘__mcopy_atomic_hugetlb’:
mm/userfaultfd.c:284:6: warning: variable ‘vm_alloc_shared’ set but not used [-Wunused-but-set-variable]
  int vm_alloc_shared = dst_vma->vm_flags & VM_SHARED;
      ^~~~~~~~~~~~~~~

commit 1786d0012620 ("mm, hugetlb: fix racy resv_huge_pages underflow on UFFDIO_COPY")
left behind this.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 mm/userfaultfd.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/mm/userfaultfd.c b/mm/userfaultfd.c
index 33fb405219e9..0e2132834bc7 100644
--- a/mm/userfaultfd.c
+++ b/mm/userfaultfd.c
@@ -281,7 +281,6 @@ static __always_inline ssize_t __mcopy_atomic_hugetlb(struct mm_struct *dst_mm,
 					      unsigned long len,
 					      enum mcopy_atomic_mode mode)
 {
-	int vm_alloc_shared = dst_vma->vm_flags & VM_SHARED;
 	int vm_shared = dst_vma->vm_flags & VM_SHARED;
 	ssize_t err;
 	pte_t *dst_pte;
@@ -380,7 +379,6 @@ static __always_inline ssize_t __mcopy_atomic_hugetlb(struct mm_struct *dst_mm,
 
 		mutex_unlock(&hugetlb_fault_mutex_table[hash]);
 		i_mmap_unlock_read(mapping);
-		vm_alloc_shared = vm_shared;
 
 		cond_resched();
 
-- 
2.17.1



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-06-01 14:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-01 14:16 [PATCH -next] userfaultfd: Remove set but not used variable 'vm_alloc_shared' YueHaibing

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox