[mmotm:master 310/355] mm/memory.c:3007:23: error: too many arguments to function 'pte_alloc_one'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   git://git.cmpxchg.org/linux-mmotm.git master
head:   98c1d1d6a1d1553512e5db8c07a149c41e7c2f84
commit: 47931f365e6eaac24d1653e3ce00f69e76187c08 [310/355] mm: treewide: remove unused address argument from pte_alloc functions
config: x86_64-rhel-7.2-clear (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
        git checkout 47931f365e6eaac24d1653e3ce00f69e76187c08
        # save the attached .config to linux build tree
        make ARCH=x86_64 

Note: the mmotm/master HEAD 98c1d1d6a1d1553512e5db8c07a149c41e7c2f84 builds fine.
      It only hurts bisectibility.

All errors (new ones prefixed by >>):

   mm/memory.c: In function '__do_fault':
>> mm/memory.c:3007:23: error: too many arguments to function 'pte_alloc_one'
      vmf->prealloc_pte = pte_alloc_one(vmf->vma->vm_mm, vmf->address);
                          ^~~~~~~~~~~~~
   In file included from arch/x86/include/asm/mmu_context.h:12:0,
                    from mm/memory.c:74:
   arch/x86/include/asm/pgalloc.h:51:18: note: declared here
    extern pgtable_t pte_alloc_one(struct mm_struct *);
                     ^~~~~~~~~~~~~

vim +/pte_alloc_one +3007 mm/memory.c

^1da177e4 Linus Torvalds     2005-04-16  2991  
9a95f3cf7 Paul Cassella      2014-08-06  2992  /*
9a95f3cf7 Paul Cassella      2014-08-06  2993   * The mmap_sem must have been held on entry, and may have been
9a95f3cf7 Paul Cassella      2014-08-06  2994   * released depending on flags and vma->vm_ops->fault() return value.
9a95f3cf7 Paul Cassella      2014-08-06  2995   * See filemap_fault() and __lock_page_retry().
9a95f3cf7 Paul Cassella      2014-08-06  2996   */
2b7403035 Souptick Joarder   2018-08-23  2997  static vm_fault_t __do_fault(struct vm_fault *vmf)
7eae74af3 Kirill A. Shutemov 2014-04-03  2998  {
82b0f8c39 Jan Kara           2016-12-14  2999  	struct vm_area_struct *vma = vmf->vma;
2b7403035 Souptick Joarder   2018-08-23  3000  	vm_fault_t ret;
7eae74af3 Kirill A. Shutemov 2014-04-03  3001  
d85ec7561 Michal Hocko       2018-12-19  3002  	/*
d85ec7561 Michal Hocko       2018-12-19  3003  	 * Preallocate pte before we take page_lock because this might lead to
d85ec7561 Michal Hocko       2018-12-19  3004  	 * deadlocks for memcg reclaim which waits for pages under writeback.
d85ec7561 Michal Hocko       2018-12-19  3005  	 */
d85ec7561 Michal Hocko       2018-12-19  3006  	if (pmd_none(*vmf->pmd) && !vmf->prealloc_pte) {
d85ec7561 Michal Hocko       2018-12-19 @3007  		vmf->prealloc_pte = pte_alloc_one(vmf->vma->vm_mm, vmf->address);
d85ec7561 Michal Hocko       2018-12-19  3008  		if (!vmf->prealloc_pte)
d85ec7561 Michal Hocko       2018-12-19  3009  			return VM_FAULT_OOM;
d85ec7561 Michal Hocko       2018-12-19  3010  		smp_wmb(); /* See comment in __pte_alloc() */
d85ec7561 Michal Hocko       2018-12-19  3011  	}
d85ec7561 Michal Hocko       2018-12-19  3012  
11bac8000 Dave Jiang         2017-02-24  3013  	ret = vma->vm_ops->fault(vmf);
3917048d4 Jan Kara           2016-12-14  3014  	if (unlikely(ret & (VM_FAULT_ERROR | VM_FAULT_NOPAGE | VM_FAULT_RETRY |
b1aa812b2 Jan Kara           2016-12-14  3015  			    VM_FAULT_DONE_COW)))
bc2466e42 Jan Kara           2016-05-12  3016  		return ret;
7eae74af3 Kirill A. Shutemov 2014-04-03  3017  
667240e0f Jan Kara           2016-12-14  3018  	if (unlikely(PageHWPoison(vmf->page))) {
7eae74af3 Kirill A. Shutemov 2014-04-03  3019  		if (ret & VM_FAULT_LOCKED)
667240e0f Jan Kara           2016-12-14  3020  			unlock_page(vmf->page);
667240e0f Jan Kara           2016-12-14  3021  		put_page(vmf->page);
936ca80d3 Jan Kara           2016-12-14  3022  		vmf->page = NULL;
7eae74af3 Kirill A. Shutemov 2014-04-03  3023  		return VM_FAULT_HWPOISON;
7eae74af3 Kirill A. Shutemov 2014-04-03  3024  	}
7eae74af3 Kirill A. Shutemov 2014-04-03  3025  
7eae74af3 Kirill A. Shutemov 2014-04-03  3026  	if (unlikely(!(ret & VM_FAULT_LOCKED)))
667240e0f Jan Kara           2016-12-14  3027  		lock_page(vmf->page);
7eae74af3 Kirill A. Shutemov 2014-04-03  3028  	else
667240e0f Jan Kara           2016-12-14  3029  		VM_BUG_ON_PAGE(!PageLocked(vmf->page), vmf->page);
7eae74af3 Kirill A. Shutemov 2014-04-03  3030  
7eae74af3 Kirill A. Shutemov 2014-04-03  3031  	return ret;
7eae74af3 Kirill A. Shutemov 2014-04-03  3032  }
7eae74af3 Kirill A. Shutemov 2014-04-03  3033  

:::::: The code at line 3007 was first introduced by commit
:::::: d85ec756157ff970b1412dd5958e8adab6a4e661 mm, memcg: fix reclaim deadlock with writeback

:::::: TO: Michal Hocko <mhocko@xxxxxxxx>
:::::: CC: Johannes Weiner <hannes@xxxxxxxxxxx>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux