函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:vma_link

函数原型:static void vma_link(struct mm_struct *mm, struct vm_area_struct *vma, struct vm_area_struct *prev, struct rb_node **rb_link, struct rb_node *rb_parent)

返回类型:void

参数:

类型参数名称
struct mm_struct *mm
struct vm_area_struct *vma
struct vm_area_struct *prev
struct rb_node **rb_link
struct rb_node *rb_parent
644  struct address_space * mapping = NULL
646  如果File we map to (can be NULL).
647  mapping等于f_mapping
648  i_mmap_lock_write(mapping)
651  __vma_link(mm, vma, prev, rb_link, rb_parent)
652  __vma_link_file(vma)
654  如果mappingi_mmap_unlock_write(mapping)
657  number of VMAs 自加
658  validate_mm(mm)
调用者
名称描述
mmap_region
do_brk_flagshis is really a simplified "do_mmap". it only handles* anonymous maps. eventually we may be able to do some* brk-specific accounting here.
insert_vm_structInsert vm structure into process list sorted by address* and into the inode's i_mmap tree. If vm_file is non-NULL* then i_mmap_rwsem is taken here.
copy_vmaCopy the vma structure to a new location in the same mm,* prior to moving page table entries, to effect an mremap move.