Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp746154pxv; Thu, 15 Jul 2021 15:07:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx2OTgTS6ee+rUbiCnN2sD7GtKymVgsWenEAzwkdNyIg1KVN9tExESMzObGjBZjXP3wB8IL X-Received: by 2002:aa7:d15a:: with SMTP id r26mr10034941edo.172.1626386867432; Thu, 15 Jul 2021 15:07:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626386867; cv=none; d=google.com; s=arc-20160816; b=yNT78RbI97CWGp9gpppotIdQEHtBCoI4/lakxt6Xzy2vB2nPPkwIV3dzjnXo53EJdG PHZ+dOAgO+F72LuLlb+sri6dNhKvV6aK8vi5Cg2iFB3HXacv2lXPD9kONiBw8gf1VX57 /aaqTMq853mggm1fzqpItzka80RqVcdKisClnm9Sx1qBkzTLT//jCOhrLvpQ98Uv1jLt fOkWjDVj7kpKIjDD9QXa897A7tG89hcxh1CC+INaCKfEVytQBtyXaJNbKs0hGAqvoSNT CHEEiViq6in+ysnsB1rVGa1AouLrQ3ui5xxK+A3FgMUsV9Y9qn1g2kD4kpRujawKC/+j mFcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=1XsTZCit05zouWtkazN7zsCUxCWnixaNh4kT1vr/fiw=; b=Kac1t6hkfEzwbXb9F6H4OFtZKm+y5V9g76txrsf+yUpwlBZEgjf8Rv5hUUsJfRhILM F4dax3mvlK3CSnR9ypWB0rQKzPEOi9ZjQo41V4g1Yh9f6HczcvwjhmZ44K4h9WDZZA2N 5IxdpSW0xzYr0HF1a4wNLGDx4kx7EGL8e1JeNDIjIPFdIef5oilVTXMRux5DiS+Acxkl er90t5mSUo+uFvuzi/+EbUbjxztof9wjajXCbRKcrZVc4uKXpaqV6NxjQEiSCPGU6ty6 MLUi7atuVywdDfRikI8tj8dc6JadzEscurTJyFwAmmnyt48AH7E9MKDxAKtbmakh05E4 hBng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="F/JwXa5s"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r18si9131389edd.215.2021.07.15.15.07.24; Thu, 15 Jul 2021 15:07:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="F/JwXa5s"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231871AbhGOWIY (ORCPT + 99 others); Thu, 15 Jul 2021 18:08:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:50856 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229810AbhGOWIY (ORCPT ); Thu, 15 Jul 2021 18:08:24 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7260161289; Thu, 15 Jul 2021 22:05:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1626386730; bh=2DNiy/SAZIn85u0H7EsbVIpErwFNqQieQxrkYGH9t9I=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=F/JwXa5sm9OQeE5U+7V2hYUt9LKnsW5tCFuUYSUgeIZ1WeWoEp1GkDg1nVAsShw+i +C09GkLHMp1kYDcC4zjphMJ3aLEx6MiLWyL6+2ZEU/W/1oUhKreN+Cf3h4oXyI5b8Y Q/VURNDNpFUzhtIUrlxAgoIG+3ezWW4dmpzSiBFU9s/0P7gjXbG4uGPClZiWotBLhY S4b39BjsrIHSlPafmPeIOoQLNJX9ZaMFq22PSiMvsLbXKl2As5glV5gzn7PPPm+Rxs tPDwZXIxyze4wJF1XfXFGtZ7/OozPsDkxh5Oal/GqvizsX0PB2Is06VrcTlHjXEBXp mvFyRWuR07HMw== Date: Thu, 15 Jul 2021 15:05:30 -0700 From: "Darrick J. Wong" To: "Matthew Wilcox (Oracle)" Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH v14 107/138] iomap: Convert iomap_migrate_page to use folios Message-ID: <20210715220530.GR22357@magnolia> References: <20210715033704.692967-1-willy@infradead.org> <20210715033704.692967-108-willy@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210715033704.692967-108-willy@infradead.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 15, 2021 at 04:36:33AM +0100, Matthew Wilcox (Oracle) wrote: > The arguments are still pages for now, but we can use folios internally > and cut out a lot of calls to compound_head(). > > Signed-off-by: Matthew Wilcox (Oracle) Pretty straightforward conversion. Reviewed-by: Darrick J. Wong --D > --- > fs/iomap/buffered-io.c | 12 +++++++----- > 1 file changed, 7 insertions(+), 5 deletions(-) > > diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c > index 0731e2c3f44b..48de198c5603 100644 > --- a/fs/iomap/buffered-io.c > +++ b/fs/iomap/buffered-io.c > @@ -490,19 +490,21 @@ int > iomap_migrate_page(struct address_space *mapping, struct page *newpage, > struct page *page, enum migrate_mode mode) > { > + struct folio *folio = page_folio(page); > + struct folio *newfolio = page_folio(newpage); > int ret; > > - ret = migrate_page_move_mapping(mapping, newpage, page, 0); > + ret = folio_migrate_mapping(mapping, newfolio, folio, 0); > if (ret != MIGRATEPAGE_SUCCESS) > return ret; > > - if (page_has_private(page)) > - attach_page_private(newpage, detach_page_private(page)); > + if (folio_test_private(folio)) > + folio_attach_private(newfolio, folio_detach_private(folio)); > > if (mode != MIGRATE_SYNC_NO_COPY) > - migrate_page_copy(newpage, page); > + folio_migrate_copy(newfolio, folio); > else > - migrate_page_states(newpage, page); > + folio_migrate_flags(newfolio, folio); > return MIGRATEPAGE_SUCCESS; > } > EXPORT_SYMBOL_GPL(iomap_migrate_page); > -- > 2.30.2 >