[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y6Vkjr7DNEEv4MW5@infradead.org>
Date: Fri, 23 Dec 2022 00:19:26 -0800
From: Christoph Hellwig <hch@...radead.org>
To: "Uladzislau Rezki (Sony)" <urezki@...il.com>
Cc: 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>,
Christoph Hellwig <hch@...radead.org>,
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 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>
Powered by blists - more mailing lists