fixup! mm/hugetlb: Only drop uffd-wp special pte if required
authorPeter Xu <peterx@redhat.com>
Thu, 14 Apr 2022 19:16:52 +0000 (12:16 -0700)
committerLiam R. Howlett <Liam.Howlett@oracle.com>
Thu, 14 Apr 2022 21:49:52 +0000 (17:49 -0400)
fix sparse warning

Link: https://lkml.kernel.org/r/Ylcdw8I1L5iAoWhb@xz-m1.local
Signed-off-by: Peter Xu <peterx@redhat.com>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/hugetlbfs/inode.c
include/linux/hugetlb.h
mm/hugetlb.c
mm/memory.c

index 8b5b9df2be7d8a4ef3a894aba5a571add6b71041..c0bf65c70ade4d428349087102d8a94818a037e5 100644 (file)
@@ -405,7 +405,7 @@ static void remove_huge_page(struct page *page)
 
 static void
 hugetlb_vmdelete_list(struct rb_root_cached *root, pgoff_t start, pgoff_t end,
-                     unsigned long zap_flags)
+                     zap_flags_t zap_flags)
 {
        struct vm_area_struct *vma;
 
index 9bbdd97f611a5fb5e7ac7f018f03ae1f894043a1..19cec415f54685191f8e809de3928ff6462d832a 100644 (file)
@@ -144,11 +144,11 @@ long follow_hugetlb_page(struct mm_struct *, struct vm_area_struct *,
                         int *);
 void unmap_hugepage_range(struct vm_area_struct *,
                          unsigned long, unsigned long, struct page *,
-                         unsigned long);
+                         zap_flags_t);
 void __unmap_hugepage_range_final(struct mmu_gather *tlb,
                          struct vm_area_struct *vma,
                          unsigned long start, unsigned long end,
-                         struct page *ref_page, unsigned long zap_flags);
+                         struct page *ref_page, zap_flags_t zap_flags);
 void hugetlb_report_meminfo(struct seq_file *);
 int hugetlb_report_node_meminfo(char *buf, int len, int nid);
 void hugetlb_show_meminfo(void);
@@ -408,7 +408,7 @@ static inline unsigned long hugetlb_change_protection(
 static inline void __unmap_hugepage_range_final(struct mmu_gather *tlb,
                        struct vm_area_struct *vma, unsigned long start,
                        unsigned long end, struct page *ref_page,
-                       unsigned long zap_flags)
+                       zap_flags_t zap_flags)
 {
        BUG();
 }
index 33c768776edbbe79061a19c13e63975d1c257128..0b19f3158dc63b7be8da2eb6a3eb703c8540b81d 100644 (file)
@@ -4962,7 +4962,7 @@ int move_hugetlb_page_tables(struct vm_area_struct *vma,
 
 static void __unmap_hugepage_range(struct mmu_gather *tlb, struct vm_area_struct *vma,
                                   unsigned long start, unsigned long end,
-                                  struct page *ref_page, unsigned long zap_flags)
+                                  struct page *ref_page, zap_flags_t zap_flags)
 {
        struct mm_struct *mm = vma->vm_mm;
        unsigned long address;
@@ -5096,7 +5096,7 @@ static void __unmap_hugepage_range(struct mmu_gather *tlb, struct vm_area_struct
 void __unmap_hugepage_range_final(struct mmu_gather *tlb,
                          struct vm_area_struct *vma, unsigned long start,
                          unsigned long end, struct page *ref_page,
-                         unsigned long zap_flags)
+                         zap_flags_t zap_flags)
 {
        __unmap_hugepage_range(tlb, vma, start, end, ref_page, zap_flags);
 
@@ -5115,7 +5115,7 @@ void __unmap_hugepage_range_final(struct mmu_gather *tlb,
 
 void unmap_hugepage_range(struct vm_area_struct *vma, unsigned long start,
                          unsigned long end, struct page *ref_page,
-                         unsigned long zap_flags)
+                         zap_flags_t zap_flags)
 {
        struct mmu_gather tlb;
 
index b91989cc3a94a3c8d5f00bfda06b5cc9d104f3df..25b5f1bc3a22edaee7a2ec177b641e9fcab2107e 100644 (file)
@@ -1684,7 +1684,7 @@ static void unmap_single_vma(struct mmu_gather *tlb,
                         * safe to do nothing in this case.
                         */
                        if (vma->vm_file) {
-                               unsigned long zap_flags = details ?
+                               zap_flags_t zap_flags = details ?
                                    details->zap_flags : 0;
                                i_mmap_lock_write(vma->vm_file->f_mapping);
                                __unmap_hugepage_range_final(tlb, vma, start, end,