diff options
author | Liam Howlett <liam.howlett@oracle.com> | 2023-01-09 23:58:20 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-01-24 09:24:33 +0300 |
commit | e733121383c059cfa0db8f6bb7f7bc80f56ce7ef (patch) | |
tree | af34947e1b9eac9488b9edc7d80af8a0f72d78ba /mm/backing-dev.c | |
parent | 6447569f4fce2c759e701bd45ea72ff802e817a0 (diff) | |
download | linux-e733121383c059cfa0db8f6bb7f7bc80f56ce7ef.tar.xz |
nommu: fix split_vma() map_count error
commit fd9edbdbdcde6b489ce59f326755ef16a2ffadd7 upstream.
During the maple tree conversion of nommu, an error in counting the VMAs
was introduced by counting the existing VMA again. The counting used to
be decremented by one and incremented by two, but now it only increments
by two. Fix the counting error by moving the increment outside the
setup_vma_to_mm() function to the callers.
Link: https://lkml.kernel.org/r/20230109205809.956325-1-Liam.Howlett@oracle.com
Fixes: 8220543df148 ("nommu: remove uses of VMA linked list")
Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Yu Zhao <yuzhao@google.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'mm/backing-dev.c')
0 files changed, 0 insertions, 0 deletions