linux-next: build failure after merge of the mm tree
Subsystems (2)
Hi all,
After merging the mm tree, today's linux-next build (various) failed like this:
mm/khugepaged.c:1702:9: error: implicit declaration of function ‘vma_try_start_write’; did you mean ‘vma_start_write’? [-Werror=implicit-function-declaration]
Caused by commit
92e3612279f9 ("mm/khugepaged: fix vm_lock/i_mmap_rwsem inversion in retract_page_tables")
The definition of vma_try_start_write() is protected by CONFIG_PER_VMA_LOCK, but its use is not.
Signature · 2 lines
Cheers, Stephen Rothwell
Andrew Morton
maintainerQuoted 5 lines · On Mon, 6 Mar 2023 13:54:47 +1100 Stephen Rothwell <[email protected]> wrote:
Hi all,
After merging the mm tree, today's linux-next build (various) failed like this:
Quoted 8 lines
mm/khugepaged.c:1702:9: error: implicit declaration of function ‘vma_try_start_write’; did you mean ‘vma_start_write’? [-Werror=implicit-function-declaration]Caused by commit
92e3612279f9("mm/khugepaged: fix vm_lock/i_mmap_rwsem inversion inretract_page_tables")The definition of
vma_try_start_write()is protected byCONFIG_PER_VMA_LOCK, but its use is not.
Thanks. Suren has a fix, but I haven't pushed it out yet :(
From: Suren Baghdasaryan <[email protected]>
Subject: txt-mm-khugepaged-write-lock-vma-while-collapsing-a-huge-page-fix-fix
Date: Sat, 4 Mar 2023 15:24:15 -0800
I missed vma_try_start_write() definition for CONFIG_PER_VMA_LOCK=n configuration.
---
include/linux/mm.h renamed from include/linux/mm.h~mm-khugepaged-write-lock-vma-while-collapsing-a-huge-page-fix-fix +2 -0
@@ -717,6 +717,8 @@ static inline bool vma_start_read(struct {return false; }static inline void vma_end_read (struct vm_area_struct *vma) {}static inline void vma_start_write (struct vm_area_struct *vma) {} +static inline bool vma_try_start_write (struct vm_area_struct *vma) + {return true; }static inline void vma_assert_write_locked (struct vm_area_struct *vma) {}#endif /* CONFIG_PER_VMA_LOCK */
_