函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\mmap.c Create Date:2022-07-27 16:15:58
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Return true if we can merge this (vm_flags,anon_vma,file,vm_pgoff)* beyond (at a higher virtual address and file offset than) the vma.* We cannot merge two vmas if they have differently assigned (non-NULL)

函数原型:static int can_vma_merge_after(struct vm_area_struct *vma, unsigned long vm_flags, struct anon_vma *anon_vma, struct file *file, unsigned long vm_pgoff, struct vm_userfaultfd_ctx vm_userfaultfd_ctx)

返回类型:int

参数:

类型参数名称
struct vm_area_struct *vma
unsigned longvm_flags
struct anon_vma *anon_vma
struct file *file
unsigned longvm_pgoff
struct vm_userfaultfd_ctxvm_userfaultfd_ctx
1060  如果If the vma has a ->close operation then the driver probably needs to release* per-vma resources, so we don't attempt to merge those.is_mergeable_anon_vma(anon_vma, Serialized by page_table_lock , vma)则
1063  vm_pglen等于vma_pages(vma)
1064  如果Offset (within vm_file) in PAGE_SIZEunits vm_pglen恒等于vm_pgoff则返回:1
1067  返回:0
调用者
名称描述
vma_mergeGiven a mapping request (addr,end,vm_flags,file,pgoff), figure out* whether that can be merged with its predecessor or its successor