]> git.baikalelectronics.ru Git - kernel.git/commit
mm/mmap.c: rb_parent is not necessary in __vma_link_list()
authorWei Yang <richardw.yang@linux.intel.com>
Sun, 1 Dec 2019 01:50:53 +0000 (17:50 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sun, 1 Dec 2019 14:29:19 +0000 (06:29 -0800)
commita6af066b9b6d21b16f778c32f96825fda8e42c91
tree413724e68ad7e10d88f9cc738d220eb241d605e7
parent0e6c5d1cad2410bf2e3e474e488035839987862e
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>
mm/internal.h
mm/mmap.c
mm/nommu.c
mm/util.c