diff options
author | Wei Yang <richardw.yang@linux.intel.com> | 2019-12-01 04:50:53 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-12-01 17:29:19 +0300 |
commit | aba6dfb75fe15650991442efd137c32fbf2e2b85 (patch) | |
tree | 413724e68ad7e10d88f9cc738d220eb241d605e7 /mm/internal.h | |
parent | 1b9fc5b24fa2e7c0e67778cda77ac231fb4bcac7 (diff) | |
download | linux-aba6dfb75fe15650991442efd137c32fbf2e2b85.tar.xz |
mm/mmap.c: rb_parent is not necessary in __vma_link_list()
Now we use rb_parent to get next, while this is not necessary.
When prev is NULL, this means vma should be the first element in the list.
Then next should be current first one (mm->mmap), no matter whether we
have parent or not.
After removing it, the code shows the beauty of symmetry.
Link: http://lkml.kernel.org/r/20190813032656.16625-1-richardw.yang@linux.intel.com
Signed-off-by: Wei Yang <richardw.yang@linux.intel.com>
Acked-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Mel Gorman <mgorman@techsingularity.net>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Matthew Wilcox <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/internal.h')
-rw-r--r-- | mm/internal.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/internal.h b/mm/internal.h index 523d2a3ee923..a246c516ade2 100644 --- a/mm/internal.h +++ b/mm/internal.h @@ -290,7 +290,7 @@ static inline bool is_data_mapping(vm_flags_t flags) /* mm/util.c */ void __vma_link_list(struct mm_struct *mm, struct vm_area_struct *vma, - struct vm_area_struct *prev, struct rb_node *rb_parent); + struct vm_area_struct *prev); void __vma_unlink_list(struct mm_struct *mm, struct vm_area_struct *vma); #ifdef CONFIG_MMU |