The patch titled Subject: mm/mmap: make accountable_mapping return bool has been added to the -mm mm-unstable branch. Its filename is mm-mmap-make-accountable_mapping-return-bool.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-mmap-make-accountable_mapping-return-bool.patch This patch will later appear in the mm-unstable branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm 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 via the mm-everything branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm and is updated there every 2-3 working days ------------------------------------------------------ From: Hao Ge <gehao@xxxxxxxxxx> Subject: mm/mmap: make accountable_mapping return bool Date: Sun, 7 Apr 2024 14:38:43 +0800 accountable_mapping can return bool,so we change it Link: https://lkml.kernel.org/r/20240407063843.804274-1-gehao@xxxxxxxxxx Signed-off-by: Hao Ge <gehao@xxxxxxxxxx> Cc: Liam R. Howlett <Liam.Howlett@xxxxxxxxxx> Cc: Lorenzo Stoakes <lstoakes@xxxxxxxxx> Cc: Matthew Wilcox (Oracle) <willy@xxxxxxxxxxxxx> Cc: Vlastimil Babka <vbabka@xxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/mmap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/mm/mmap.c~mm-mmap-make-accountable_mapping-return-bool +++ a/mm/mmap.c @@ -1549,14 +1549,14 @@ bool vma_wants_writenotify(struct vm_are * We account for memory if it's a private writeable mapping, * not hugepages and VM_NORESERVE wasn't set. */ -static inline int accountable_mapping(struct file *file, vm_flags_t vm_flags) +static inline bool accountable_mapping(struct file *file, vm_flags_t vm_flags) { /* * hugetlb has its own accounting separate from the core VM * VM_HUGETLB may not be set yet so we cannot check for that flag. */ if (file && is_file_hugepages(file)) - return 0; + return false; return (vm_flags & (VM_NORESERVE | VM_SHARED | VM_WRITE)) == VM_WRITE; } _ Patches currently in -mm which might be from gehao@xxxxxxxxxx are mm-page-flags-make-__pagemovable-return-bool.patch mm-page-flags-make-pagemappingflags-return-bool.patch mm-mmap-make-vma_wants_writenotify-return-bool.patch mm-mmap-make-accountable_mapping-return-bool.patch