From patchwork Mon Jul 19 18:39:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Wilcox X-Patchwork-Id: 12386883 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9916BC07E9B for ; Mon, 19 Jul 2021 22:09:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 694CA6112D for ; Mon, 19 Jul 2021 22:09:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245066AbhGSV2L (ORCPT ); Mon, 19 Jul 2021 17:28:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58268 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1381440AbhGSSHQ (ORCPT ); Mon, 19 Jul 2021 14:07:16 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 36A43C061793; Mon, 19 Jul 2021 11:32:39 -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=IcqJM902sWDHlXXt8KHS5wivXFgGLpkF/GJJNHr6Ztg=; b=YfcIIN675oN36zD8aZlB85W3OM B00FvdJea0x80Vd9OzW1h4EaeRnH1eeQ50ZgdbuAt+jU5ORHWYK3xIc9Fxd6lPtgrSFBhJ8jb3vbX X8HJ1URooNyjHvlx/5F0maLeMyd/ZARrDJCQMX1eDaxK6umdwoAbtyBbZtVc8cSCgZo8zWF/R7BfB MFAjxYPGsjBd2+7NjiIudxpWwcN8p1OHPagMdg7kRS4SmUiOylH2i/RGCSoPjirirILPfVn6w3ygz H5cI3ebTi+a35NDWbeFbrT8CY/Fb5aTPJvEg8vxFsT8sl2r/u0g0VpOhkmTT7Y1UAqNzF3DCKbWKX qI5Hl0Cg==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1m5YEq-007LaI-FS; Mon, 19 Jul 2021 18:43:48 +0000 From: "Matthew Wilcox (Oracle)" To: linux-fsdevel@vger.kernel.org Cc: "Matthew Wilcox (Oracle)" , linux-mm@kvack.org, linux-block@vger.kernel.org Subject: [PATCH v15 06/17] iomap: Convert iomap_releasepage to use a folio Date: Mon, 19 Jul 2021 19:39:50 +0100 Message-Id: <20210719184001.1750630-7-willy@infradead.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210719184001.1750630-1-willy@infradead.org> References: <20210719184001.1750630-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 83eb5fdcbe05..715b25a1c1e6 100644 --- a/fs/iomap/buffered-io.c +++ b/fs/iomap/buffered-io.c @@ -460,15 +460,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;