Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp2532131pxb; Wed, 9 Feb 2022 22:54:55 -0800 (PST) X-Google-Smtp-Source: ABdhPJyXzXi5RT7XQcuJ+7uQq9ljyg6+rYyVRrWA2TbXao3whRfljM7ldq1VP93bRx3T74a36uM4 X-Received: by 2002:a17:902:bc44:: with SMTP id t4mr6427493plz.148.1644476094756; Wed, 09 Feb 2022 22:54:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644476094; cv=none; d=google.com; s=arc-20160816; b=QXMJs8B/khNbqWH2YADhh3WHLesr+RdrwP5pXXCIyzbUbjrDT0X0A6sD8qzoRePn1P C7mJ/e+vlvp20y7RYPwEAx7CLM64CeRdGkd+0CyH/dkG7TVxq4zM5NiijdTjXHdoyocK Bbm5YmEpnsL3VSjZGwhtVLN0QQ+YD0lzWCA62FpHO0kCMT1qcTvk7AuBp3DgwBfMwOyZ w8u7LklTkcdf+VjpbJkYTIKnpwFsx54tVGEhBgpJ4++RLkeMjMu5TLEfyt36Lq+XfSgS FnDgKq2ea/80zEcnS4co2LnztKEdghDjDkNNeeD9QWXffZ1afX1RWeMDvug1T/I1jKuc 6qYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=soxibM+s4ZTbor6NJ5mv+4swoMLV/nGFoJaxp5TPbMo=; b=sV1GYvV0UiCFZ4T1hXTekIJFz1oOKSFNdtBDyeQzZSq3K6wBaTwFFBZXrBxjGQm4K6 OYjtUkjiEga5nIu8dhwvBm1GLaZmKEkUZjGQTO3PUKWraO01dKlcqU7UyCLO0kYywjNO YAcakbwTDytSn3Nzx6h/La13vfXjWZ1Yg/bLNvAQ0H1LGay0Dzmg0EZ92nccWzWyLXDl VGm0qxpdDSeIdafrwzQ2PR6aGFGZVGqynrn+q46rxpnqYkTFGHVB639wDvGpoNbGlyv7 vl75ls82xegTGRPglple5zTBEn9Slc0cGHt3o8EI8ojIxZDgfAEaSnxuXsM0BzCWdTLN cIxg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p19si1062881plq.558.2022.02.09.22.54.38; Wed, 09 Feb 2022 22:54:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235481AbiBJGp1 (ORCPT + 99 others); Thu, 10 Feb 2022 01:45:27 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:51814 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231362AbiBJGpZ (ORCPT ); Thu, 10 Feb 2022 01:45:25 -0500 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 22458D96 for ; Wed, 9 Feb 2022 22:45:26 -0800 (PST) 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-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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!