]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm/mempolicy: use vma iterator & maple state instead of vma linked list
authorLiam R. Howlett <Liam.Howlett@Oracle.com>
Thu, 14 Apr 2022 06:07:22 +0000 (23:07 -0700)
committerLiam R. Howlett <Liam.Howlett@oracle.com>
Thu, 14 Apr 2022 21:49:48 +0000 (17:49 -0400)
commite3b05b85eb756ad731cc3ba976693ef7d24163d4
tree1a6516a47918fef4b3a05ac8dc1e5ebb02e57e8e
parent28c9ce2cbc05637aca7b3ecc25728261d2351007
mm/mempolicy: use vma iterator & maple state instead of vma linked list

Reworked the way mbind_range() finds the first VMA to reuse the maple
state and limit the number of tree walks needed.

Note, this drops the VM_BUG_ON(!vma) call, which would catch a start
address higher than the last VMA.  The code was written in a way that
allowed no VMA updates to occur and still return success.  There should be
no functional change to this scenario with the new code.

Link: https://lkml.kernel.org/r/20220404143501.2016403-58-Liam.Howlett@oracle.com
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/mempolicy.c