Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\mmap.c Create Date:2022-07-28 14:47:56
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)* in front of (at a lower 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_before(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
1039  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
1041  If Offset (within vm_file) in PAGE_SIZEunits == vm_pgoff Then Return 1
1044  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