[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220216183155.nstxhvhggrxktfoz@revolver>
Date: Wed, 16 Feb 2022 18:32:04 +0000
From: Liam Howlett <liam.howlett@...cle.com>
To: Mark Hemment <markhemm@...glemail.com>
CC: "maple-tree@...ts.infradead.org" <maple-tree@...ts.infradead.org>,
"linux-mm@...ck.org" <linux-mm@...ck.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH v6 11/71] mm: Add VMA iterator
* Mark Hemment <markhemm@...glemail.com> [220216 05:51]:
> On Tue, 15 Feb 2022 at 14:43, Liam Howlett <liam.howlett@...cle.com> wrote:
> >
> > From: "Matthew Wilcox (Oracle)" <willy@...radead.org>
> >
> > This thin layer of abstraction over the maple tree state is for
> > iterating over VMAs. You can go forwards, go backwards or ask where
> > the iterator is. Rename the existing vma_next() to __vma_next() --
> > it will be removed by the end of this series.
> >
> > Signed-off-by: Matthew Wilcox (Oracle) <willy@...radead.org>
> > Signed-off-by: Liam R. Howlett <Liam.Howlett@...cle.com>
> > Acked-by: Vlastimil Babka <vbabka@...e.cz>
> > ---
> > include/linux/mm.h | 31 +++++++++++++++++++++++++++++++
> > include/linux/mm_types.h | 21 +++++++++++++++++++++
> > mm/mmap.c | 10 +++++-----
> > 3 files changed, 57 insertions(+), 5 deletions(-)
> >
> > diff --git a/include/linux/mm.h b/include/linux/mm.h
> > +/* The MM code likes to work with exclusive end addresses */
> > +#define for_each_vma_range(vmi, vma, end) \
> > + while ((vma = vma_find(&vmi, end - 1)) != NULL)
> > +
>
> Becareful of operator precedence; parentheses around "end'".
Good catch. Thanks, I will fix this.
>
> Cheers,
> Masrk
Powered by blists - more mailing lists