The patch titled Subject: userfaultfd: remove set but not used variable 'vm_alloc_shared' has been added to the -mm tree. Its filename is mm-hugetlb-fix-racy-resv_huge_pages-underflow-on-uffdio_copy-fix.patch This patch should soon appear at https://ozlabs.org/~akpm/mmots/broken-out/mm-hugetlb-fix-racy-resv_huge_pages-underflow-on-uffdio_copy-fix.patch and later at https://ozlabs.org/~akpm/mmotm/broken-out/mm-hugetlb-fix-racy-resv_huge_pages-underflow-on-uffdio_copy-fix.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: YueHaibing <yuehaibing@xxxxxxxxxx> Subject: 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. Link: https://lkml.kernel.org/r/20210601141610.28332-1-yuehaibing@xxxxxxxxxx Signed-off-by: YueHaibing <yuehaibing@xxxxxxxxxx> Cc: Mina Almasry <almasrymina@xxxxxxxxxx> Cc: Axel Rasmussen <axelrasmussen@xxxxxxxxxx> Cc: Peter Xu <peterx@xxxxxxxxxx> Cc: Mike Kravetz <mike.kravetz@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/userfaultfd.c | 2 -- 1 file changed, 2 deletions(-) --- a/mm/userfaultfd.c~mm-hugetlb-fix-racy-resv_huge_pages-underflow-on-uffdio_copy-fix +++ a/mm/userfaultfd.c @@ -209,7 +209,6 @@ static __always_inline ssize_t __mcopy_a 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; @@ -308,7 +307,6 @@ retry: mutex_unlock(&hugetlb_fault_mutex_table[hash]); i_mmap_unlock_read(mapping); - vm_alloc_shared = vm_shared; cond_resched(); _ Patches currently in -mm which might be from yuehaibing@xxxxxxxxxx are mm-dmapool-use-device_attr_ro-macro.patch mm-hugetlb-fix-racy-resv_huge_pages-underflow-on-uffdio_copy-fix.patch mm-compaction-use-device_attr_wo-macro.patch