Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\mmap.c Create Date:2022-07-28 14:47:58
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name: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)

Proto: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)

Type:int

Parameter:

TypeParameterName
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 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) Then
1063  vm_pglen = vma_pages(vma)
1064  If Offset (within vm_file) in PAGE_SIZEunits + vm_pglen == vm_pgoff Then Return 1
1067  Return 0
Caller
NameDescribe
vma_mergeGiven a mapping request (addr,end,vm_flags,file,pgoff), figure out* whether that can be merged with its predecessor or its successor