Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Insert node immediately after prev in the interval tree

Proto:void vma_interval_tree_insert_after(struct vm_area_struct *node, struct vm_area_struct *prev, struct rb_root_cached *root)

Type:void

Parameter:

TypeParameterName
struct vm_area_struct *node
struct vm_area_struct *prev
struct rb_root_cached *root
34  last = vma_last_pgoff(node)
36  VM_BUG_ON_VMA(vma_start_pgoff(node) != vma_start_pgoff(prev), node)
38  If Not rb_right Then
39  parent = prev
40  link = rb_right
41  Else
42  parent = rb_entry(rb_right, structvm_area_struct, rb)
44  If rb_subtree_last < last Then rb_subtree_last = last
46  When rb_left cycle
52  link = rb_left
55  rb_subtree_last = last
56  rb_link_node( & rb, & rb, link)
57  Fixup the rbtree and update the augmented information when rebalancing.* On insertion, the user must update the augmented information on the path* leading to the inserted node, then call rb_link_node() as usual and