From patchwork Mon Nov 1 20:39:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Wilcox X-Patchwork-Id: 12597233 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EED09C433F5 for ; Mon, 1 Nov 2021 20:54:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D0574603E8 for ; Mon, 1 Nov 2021 20:54:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229712AbhKAU5B (ORCPT ); Mon, 1 Nov 2021 16:57:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59082 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229541AbhKAU5B (ORCPT ); Mon, 1 Nov 2021 16:57:01 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 127C8C061714; Mon, 1 Nov 2021 13:54:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=ueFWmihoV5zfuDMfImhypb9HTRzO87NoQs2UujGpLv8=; b=OGKWu1SEBM9822OPEEg/lmiJgT 7k3gApQnEmWsx0ES3GyyHPgE9/ylCjBH/5QmCr4dePidaAC5qvr436S6wdSXH0PF/kzwxomX1IU0c 17g9zPqKHjbpR/x4WwmiNOf6hQT5NUXZiNRTASm+kOA2i3C6FLrk7ObxqUUUeDE7IKuti2WSMreh3 SjbMlwPM/7CIgEqE1nqbaMwrK0+Y61Zr4AwpFJ9Yb5LILZSLO5cnHo9YuNYQpxiT6T6chzS8zKK9N Hff0RKTm+VieLQuuxLw6kfGIBFVzslbqrO/m5SMy7kpc9R3/ZiLhf67R6VP+vUel9I0kem4CDm4FC /dAUEkJA==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1mheH3-0040lX-Cu; Mon, 01 Nov 2021 20:51:55 +0000 From: "Matthew Wilcox (Oracle)" To: "Darrick J. Wong" Cc: "Matthew Wilcox (Oracle)" , linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, Jens Axboe , Christoph Hellwig Subject: [PATCH 07/21] iomap: Convert iomap_releasepage to use a folio Date: Mon, 1 Nov 2021 20:39:15 +0000 Message-Id: <20211101203929.954622-8-willy@infradead.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211101203929.954622-1-willy@infradead.org> References: <20211101203929.954622-1-willy@infradead.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org This is an address_space operation, so its argument must remain as a struct page, but we can use a folio internally. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong --- fs/iomap/buffered-io.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c index b8984f39d8b0..a6b64a1ad468 100644 --- a/fs/iomap/buffered-io.c +++ b/fs/iomap/buffered-io.c @@ -453,15 +453,15 @@ iomap_releasepage(struct page *page, gfp_t gfp_mask) { struct folio *folio = page_folio(page); - trace_iomap_releasepage(page->mapping->host, page_offset(page), - PAGE_SIZE); + trace_iomap_releasepage(folio->mapping->host, folio_pos(folio), + folio_size(folio)); /* * mm accommodates an old ext3 case where clean pages might not have had * the dirty bit cleared. Thus, it can send actual dirty pages to * ->releasepage() via shrink_active_list(); skip those here. */ - if (PageDirty(page) || PageWriteback(page)) + if (folio_test_dirty(folio) || folio_test_writeback(folio)) return 0; iomap_page_release(folio); return 1;