[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20210601141610.28332-1-yuehaibing@huawei.com>
Date: Tue, 1 Jun 2021 22:16:10 +0800
From: YueHaibing <yuehaibing@...wei.com>
To: <akpm@...ux-foundation.org>, <axelrasmussen@...gle.com>
CC: <linux-mm@...ck.org>, <linux-kernel@...r.kernel.org>,
YueHaibing <yuehaibing@...wei.com>
Subject: [PATCH -next] userfaultfd: Remove set but not used variable 'vm_alloc_shared'
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@...wei.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
Powered by blists - more mailing lists