函数逻辑报告 |
Source Code:mm\mmap.c |
Create Date:2022-07-27 16:15:51 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:We cannot adjust vm_start, vm_end, vm_pgoff fields of a vma that* is already present in an i_mmap tree without adjusting the tree.* The following helper function should be used when such adjustments* are necessary
函数原型:int __vma_adjust(struct vm_area_struct *vma, unsigned long start, unsigned long end, unsigned long pgoff, struct vm_area_struct *insert, struct vm_area_struct *expand)
返回类型:int
参数:
类型 | 参数 | 名称 |
---|---|---|
struct vm_area_struct * | vma | |
unsigned long | start | |
unsigned long | end | |
unsigned long | pgoff | |
struct vm_area_struct * | insert | |
struct vm_area_struct * | expand |
700 | struct address_space * mapping = NULL |
701 | struct rb_root_cached * root = NULL |
704 | bool start_changed = TSC's on different sockets may be reset asynchronously.* This may cause the TSC ADJUST value on socket 0 to be NOT 0., end_changed = false |
705 | adjust_next等于0 |
706 | remove_next等于0 |
709 | struct vm_area_struct * exporter = NULL, * importer = NULL |
729 | remove_next等于3 |
730 | VM_WARN_ON(file != File we map to (can be NULL). ) |
732 | 否则 |
733 | VM_WARN_ON(expand != vma) |
739 | VM_WARN_ON(remove_next == 2 && end != The first byte after our end addresswithin vm_mm. ) |
755 | 否则如果end大于Our start address within vm_mm. 则 |
763 | VM_WARN_ON(expand != importer) |
770 | adjust_next等于负The first byte after our end addresswithin vm_mm. 减end右移PAGE_SHIFT determines the page size 位的值 |
773 | VM_WARN_ON(expand != importer) |
785 | error等于anon_vma_clone(importer, exporter) |
790 | again : |
791 | vma_adjust_trans_huge(orig_vma, start, end, adjust_next) |
793 | 如果file则 |
816 | 如果anon_vma则 |
825 | 如果root则 |
827 | vma_interval_tree_remove(vma, root) |
828 | 如果adjust_next则vma_interval_tree_remove(next, root) |
832 | 如果start不等于Our start address within vm_mm. 则 |
834 | start_changed = true |
838 | end_changed = true |
841 | 如果adjust_next则 |
846 | 如果root则 |
847 | 如果adjust_next则vma_interval_tree_insert(next, root) |
849 | vma_interval_tree_insert(vma, root) |
853 | 如果remove_next则 |
858 | 如果remove_next不等于3则__vma_unlink_common(mm, next, next) |
860 | 否则__vma_unlink_common(mm, next, vma) |
873 | 否则如果insert则 |
880 | 否则 |
881 | 如果start_changed则Update augmented rbtree rb_subtree_gap values after vma->vm_start or* in the rbtree. |
883 | 如果end_changed则 |
891 | 如果anon_vma则 |
897 | 如果mapping则i_mmap_unlock_write(mapping) |
900 | 如果root则 |
907 | 如果remove_next则 |
908 | 如果file则 |
914 | number of VMAs 自减 |
915 | mpol_put(vma_policy(next)) |
916 | vm_area_free(next) |
922 | 如果remove_next不等于3则 |
930 | 否则 |
943 | 如果remove_next恒等于2则 |
950 | 否则 |
970 | VM_WARN_ON( highest vma end address != vm_end_gap(vma)) |
973 | 如果insert且file则Called from mmap_region/vma_adjust with mm->mmap_sem acquired.* Currently we ignore all errors and always return 0, the callers* can't handle the failure anyway. |
976 | validate_mm(mm) |
978 | 返回:0 |
名称 | 描述 |
---|---|
vma_merge | Given a mapping request (addr,end,vm_flags,file,pgoff), figure out* whether that can be merged with its predecessor or its successor |
vma_adjust |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |