From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 662ACC433EF for ; Thu, 10 Feb 2022 06:45:27 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E7EC26B0071; Thu, 10 Feb 2022 01:45:26 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id E2E706B0074; Thu, 10 Feb 2022 01:45:26 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CF5C26B0075; Thu, 10 Feb 2022 01:45:26 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0041.hostedemail.com [216.40.44.41]) by kanga.kvack.org (Postfix) with ESMTP id C05726B0071 for ; Thu, 10 Feb 2022 01:45:26 -0500 (EST) Received: from smtpin31.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 6B63A181D6CDB for ; Thu, 10 Feb 2022 06:45:26 +0000 (UTC) X-FDA: 79125933852.31.B65EACD Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by imf11.hostedemail.com (Postfix) with ESMTP id BD77F40007 for ; Thu, 10 Feb 2022 06:45:25 +0000 (UTC) Received: by verein.lst.de (Postfix, from userid 2407) id DE15A68BFE; Thu, 10 Feb 2022 07:45:19 +0100 (CET) Date: Thu, 10 Feb 2022 07:45:19 +0100 From: Christoph Hellwig To: Alistair Popple Cc: Felix Kuehling , Christoph Hellwig , Andrew Morton , Dan Williams , Alex Deucher , Christian =?iso-8859-1?Q?K=F6nig?= , "Pan, Xinhui" , Ben Skeggs , Karol Herbst , Lyude Paul , Jason Gunthorpe , Logan Gunthorpe , Ralph Campbell , linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org, nvdimm@lists.linux.dev, linux-mm@kvack.org Subject: Re: [PATCH 6/8] mm: don't include in Message-ID: <20220210064519.GA3692@lst.de> References: <20220207063249.1833066-1-hch@lst.de> <3287da2f-defa-9adb-e21c-c498972e674d@amd.com> <20220209174836.GA24864@lst.de> <2168128.7o4XcKHI9n@nvdebian> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2168128.7o4XcKHI9n@nvdebian> User-Agent: Mutt/1.5.17 (2007-11-01) X-Rspamd-Queue-Id: BD77F40007 Authentication-Results: imf11.hostedemail.com; dkim=none; dmarc=none; spf=none (imf11.hostedemail.com: domain of hch@lst.de has no SPF policy when checking 213.95.11.211) smtp.mailfrom=hch@lst.de X-Stat-Signature: eguysxo6riimifqdywqh9cyghn7cyq57 X-Rspam-User: X-Rspamd-Server: rspam10 X-HE-Tag: 1644475525-299692 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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!