[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220210064519.GA3692@lst.de>
Date: Thu, 10 Feb 2022 07:45:19 +0100
From: Christoph Hellwig <hch@....de>
To: Alistair Popple <apopple@...dia.com>
Cc: Felix Kuehling <felix.kuehling@....com>,
Christoph Hellwig <hch@....de>,
Andrew Morton <akpm@...ux-foundation.org>,
Dan Williams <dan.j.williams@...el.com>,
Alex Deucher <alexander.deucher@....com>,
Christian König <christian.koenig@....com>,
"Pan, Xinhui" <Xinhui.Pan@....com>,
Ben Skeggs <bskeggs@...hat.com>,
Karol Herbst <kherbst@...hat.com>,
Lyude Paul <lyude@...hat.com>, Jason Gunthorpe <jgg@...pe.ca>,
Logan Gunthorpe <logang@...tatee.com>,
Ralph Campbell <rcampbell@...dia.com>,
linux-kernel@...r.kernel.org, amd-gfx@...ts.freedesktop.org,
dri-devel@...ts.freedesktop.org, nouveau@...ts.freedesktop.org,
nvdimm@...ts.linux.dev, linux-mm@...ck.org
Subject: Re: [PATCH 6/8] mm: don't include <linux/memremap.h> in
<linux/mm.h>
On Thu, Feb 10, 2022 at 01:10:47PM +1100, Alistair Popple wrote:
> diff --git a/mm/gup.c b/mm/gup.c
> index cbb49abb7992..8e85c9fb8df4 100644
> --- a/mm/gup.c
> +++ b/mm/gup.c
> @@ -2007,7 +2007,6 @@ static long check_and_migrate_movable_pages(unsigned long nr_pages,
> if (!ret && list_empty(&movable_page_list) && !isolation_error_count)
> return nr_pages;
>
> - ret = 0;
> unpin_pages:
This isn't quite correct as ret is initially set to -EFAULT now. I'll
fix it by removing the early ret initialization and always using the
goto. I've also added another refactoring patch for this messy function.
I've folded the inversion of the is_device_coherent_page check in
migrate.c in as well, thanks!
Powered by blists - more mailing lists