From patchwork Fri Nov 18 07:30:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vishal Moola X-Patchwork-Id: 1887 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp45819wrr; Thu, 17 Nov 2022 23:31:48 -0800 (PST) X-Google-Smtp-Source: AA0mqf5wUXe1GzE6mriEfPJKuFz28n+EFAnojx+Y+CiWK4Z2uOP+NdqmSx12QeIMcm6TNiPAkPAA X-Received: by 2002:a17:90a:4313:b0:212:e24e:16b3 with SMTP id q19-20020a17090a431300b00212e24e16b3mr12335554pjg.69.1668756708640; Thu, 17 Nov 2022 23:31:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668756708; cv=none; d=google.com; s=arc-20160816; b=qBZ8W1PxNWJwak9Mvz6aJ7180PWMocmrVFxFFFrAggF6BEC4Z9nmvPH/MGsbC2qtbr Aa+9ja3dZ0xQsrLZ/UqdVnuijfEHQsvoN67kBd4rMhW+Xj5t/uZWurqIPsjnPBCLswMQ OU7k8huc6ihF7QQeqxexzbgH3stPoLqvPpE1KeItF8VOAzoh9hoG0h2PuBeqOil+AuJA ncEJw9QmbgB3mNuXrST+RucJ1pbVOiUnu3l7miLWy93t4Uqn27wuEBnEWfM1VmbN/OdT 0l/L+mL5K4e436DRVF9sjMYO9a/AJgnGf3evEC4qpkumOicP7aRDzskK6Ukf1KPZ44iX 0T5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=wtwS94zRRJyqTUvKtV8JHHAty8kXLov0sVlZCky11iI=; b=Eqds4gXJLJgyMEcL487bVJbnbidKufZCzHeIbp8tho3QEmvvuepht08qXbj+vuKDUm 6eiSUEg4237WV4rTX+0nHDC1Mo5KNAsOcuca0I3VmsaooXCMWtB/lcde7bRAk/D7besf EhuBFSIiwMl0Q4Y8sqZGdf105s0rpOheQ2SfhNZguwc338n8DUDXeWUlmXaA4NMmA0EG RXRE5mI46X46lBaeBEEGwC7s1NQZbAhUcp7LZpb+3rvftheSbvjjh7q4gMIxt4BQ6T9E dBXjKFc4NqUdUuJWlUB+7C6odtc2DCNf4kdCNtGc9Ae0JQjD6bD93EeuDfNU90uRTQHw nCug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=mvtdnCOo; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e5-20020a170902784500b00177e5c1d5d0si2855877pln.347.2022.11.17.23.31.35; Thu, 17 Nov 2022 23:31:48 -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; dkim=pass header.i=@gmail.com header.s=20210112 header.b=mvtdnCOo; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241179AbiKRHbC (ORCPT + 99 others); Fri, 18 Nov 2022 02:31:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47338 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234976AbiKRHa7 (ORCPT ); Fri, 18 Nov 2022 02:30:59 -0500 Received: from mail-pj1-x102b.google.com (mail-pj1-x102b.google.com [IPv6:2607:f8b0:4864:20::102b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 64560205EF; Thu, 17 Nov 2022 23:30:59 -0800 (PST) Received: by mail-pj1-x102b.google.com with SMTP id b1-20020a17090a7ac100b00213fde52d49so4282313pjl.3; Thu, 17 Nov 2022 23:30:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=wtwS94zRRJyqTUvKtV8JHHAty8kXLov0sVlZCky11iI=; b=mvtdnCOo5EVJMRpl2n3mwZdHhT3J/8zAsxYxERhNghlOn9ojFKpKWI1nhf2RdT6WVx kwHNzOCrOADIuK28R7LCGLO++fAC3hTokxwFmthmscnPZS06qIqKk3jAaxEimDq8sPPb ONxKXwnaMQo4L46CWUiAaNODqPmazm96vgMHPxbBFSPzjFcjcxX0WpHqnSno5Qjl1TmZ HJHY6PIZRpuHauJReCRvbrbJdlfjBCrFJLf3206T8JI34fJjnj78wComVWR6vzSk/ZOd DD0mcGJ1wTmTJzvkotZbkgH2XTeFB2pZNfkozux4TAjo5MD2jaKGMmv3odz6UMnnhoYa ZzmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=wtwS94zRRJyqTUvKtV8JHHAty8kXLov0sVlZCky11iI=; b=qOfT+/eGSVRQTw7iJdLCFhHX7Zd2SOKHnSRbqWXqomIZuxrA+80vyNeXY91VS6rwfL N4z1lH+Her8w2+FCaeLkDZs75H1RC0ObRQ1Lok+Fn8d1Gca3xZtAuwAa/S3eb5PbJZeT T9SGveWt0SaTwn5rftK3ik4ynsHM4V7ltXoxJPa/t5qHZvIqjXrgynpyUaTaPil+R6Sw EgFAjlYJyHoJ3JfUfMEL9RY9YFVAjDtP6kpQut6kohJXpLRC4iBWpX4Mp+P9jB/CHvMT J9HAkaMlFtG+naS2q1twUncZxiZUkdFvd6a1RSyH+BNqPXo7UEdkCXFdSljRY8RBcBzO Y/gw== X-Gm-Message-State: ANoB5pmk7jSBP9kxdpRjdCI311Ivn65h0uMy6Jo3WzNsuzKxmVQjjV/6 GDfLVMN0WqPfGwYiet1McMg= X-Received: by 2002:a17:902:c385:b0:17f:cdd1:7ab1 with SMTP id g5-20020a170902c38500b0017fcdd17ab1mr6397755plg.86.1668756658748; Thu, 17 Nov 2022 23:30:58 -0800 (PST) Received: from fedora.hsd1.ca.comcast.net ([2601:644:8002:1c20::2c6b]) by smtp.googlemail.com with ESMTPSA id f7-20020a625107000000b0056b818142a2sm2424325pfb.109.2022.11.17.23.30.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Nov 2022 23:30:58 -0800 (PST) From: "Vishal Moola (Oracle)" To: linux-mm@kvack.org Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-ext4@vger.kernel.org, akpm@linux-foundation.org, willy@infradead.org, naoya.horiguchi@nec.com, tytso@mit.edu, "Vishal Moola (Oracle)" Subject: [PATCH v3 0/4] Removing the try_to_release_page() wrapper Date: Thu, 17 Nov 2022 23:30:51 -0800 Message-Id: <20221118073055.55694-1-vishal.moola@gmail.com> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749798353617558165?= X-GMAIL-MSGID: =?utf-8?q?1749818234254722439?= This patchset replaces the remaining calls of try_to_release_page() with the folio equivalent: filemap_release_folio(). This allows us to remove the wrapper. The set passes fstests on ext4 and xfs. --- v3: Fixed a mistake with a VM_BUG_ON_FOLIO check v2: Added VM_BUG_ON_FOLIO to ext4 for catching future data corruption Vishal Moola (Oracle) (4): ext4: Convert move_extent_per_page() to use folios khugepage: Replace try_to_release_page() with filemap_release_folio() memory-failure: Convert truncate_error_page() to use folio folio-compat: Remove try_to_release_page() fs/ext4/move_extent.c | 52 ++++++++++++++++++++++++----------------- include/linux/pagemap.h | 1 - mm/folio-compat.c | 6 ----- mm/khugepaged.c | 23 +++++++++--------- mm/memory-failure.c | 5 ++-- 5 files changed, 46 insertions(+), 41 deletions(-)