The patch titled Subject: mm/mmap.c: use helper function allow_write_access() in __remove_shared_vm_struct() has been added to the -mm tree. Its filename is mm-mmap-use-helper-function-allow_write_access-in-__remove_shared_vm_struct.patch This patch should soon appear at https://ozlabs.org/~akpm/mmots/broken-out/mm-mmap-use-helper-function-allow_write_access-in-__remove_shared_vm_struct.patch and later at https://ozlabs.org/~akpm/mmotm/broken-out/mm-mmap-use-helper-function-allow_write_access-in-__remove_shared_vm_struct.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: Miaohe Lin <linmiaohe@xxxxxxxxxx> Subject: mm/mmap.c: use helper function allow_write_access() in __remove_shared_vm_struct() In commit 1da177e4c3f4 ("Linux-2.6.12-rc2"), the helper allow_write_access came with the atomic_inc operation of the i_writecount field in the func __remove_shared_vm_struct(). But it forgot to use this helper function. Link: https://lkml.kernel.org/r/20200921115814.39680-1-linmiaohe@xxxxxxxxxx Signed-off-by: Miaohe Lin <linmiaohe@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/mmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/mm/mmap.c~mm-mmap-use-helper-function-allow_write_access-in-__remove_shared_vm_struct +++ a/mm/mmap.c @@ -143,7 +143,7 @@ static void __remove_shared_vm_struct(st struct file *file, struct address_space *mapping) { if (vma->vm_flags & VM_DENYWRITE) - atomic_inc(&file_inode(file)->i_writecount); + allow_write_access(file); if (vma->vm_flags & VM_SHARED) mapping_unmap_writable(mapping); _ Patches currently in -mm which might be from linmiaohe@xxxxxxxxxx are mm-swap-fix-confusing-comment-in-release_pages.patch mm-memcontrol-correct-the-comment-of-mem_cgroup_iter.patch mm-page_counter-correct-the-obsolete-func-name-in-the-comment-of-page_counter_try_charge.patch mm-memcontrol-remove-obsolete-comment-of-mem_cgroup_unmark_under_oom.patch mm-use-helper-function-mapping_allow_writable.patch mm-mmap-use-helper-function-allow_write_access-in-__remove_shared_vm_struct.patch mm-vmstat-use-helper-macro-abs.patch mm-fix-some-broken-comments.patch mm-migrate-avoid-possible-unnecessary-process-right-check-in-kernel_move_pages.patch