[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y6XawyzTqaUBb2xJ@pc636>
Date: Fri, 23 Dec 2022 17:43:47 +0100
From: Uladzislau Rezki <urezki@...il.com>
To: Christoph Hellwig <hch@...radead.org>
Cc: "Uladzislau Rezki (Sony)" <urezki@...il.com>,
Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org,
LKML <linux-kernel@...r.kernel.org>, Baoquan He <bhe@...hat.com>,
Lorenzo Stoakes <lstoakes@...il.com>,
Matthew Wilcox <willy@...radead.org>,
Nicholas Piggin <npiggin@...il.com>,
Oleksiy Avramchenko <oleksiy.avramchenko@...y.com>,
Roman Gushchin <roman.gushchin@...ux.dev>
Subject: Re: [PATCH v3 1/3] mm: vmalloc: Avoid calling __find_vmap_area()
twice in __vunmap()
On Fri, Dec 23, 2022 at 12:19:26AM -0800, Christoph Hellwig wrote:
> On Thu, Dec 22, 2022 at 08:00:20PM +0100, Uladzislau Rezki (Sony) wrote:
> > @@ -1825,9 +1825,8 @@ static void free_vmap_area_noflush(struct vmap_area *va)
> > unsigned long va_start = va->va_start;
> > unsigned long nr_lazy;
> >
> > - spin_lock(&vmap_area_lock);
> > - unlink_va(va, &vmap_area_root);
> > - spin_unlock(&vmap_area_lock);
> > + if (WARN_ON_ONCE(!list_empty(&va->list)))
> > + return;
>
> I'd just drop this check as the function is not exported.
>
>
> Otherwise looks good:
>
> Reviewed-by: Christoph Hellwig <hch@....de>
>
Thanks!
--
Uladzislau Rezki
Powered by blists - more mailing lists