Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp200399rwb; Thu, 17 Nov 2022 23:32:09 -0800 (PST) X-Google-Smtp-Source: AA0mqf7+xZWSWgDEQisKAGfEoZHp/uxizlokFjX70k7CV8eoq9tW82kLFZFA79MY6I6+XtMgEO46 X-Received: by 2002:a17:90b:48cf:b0:205:e1af:68d1 with SMTP id li15-20020a17090b48cf00b00205e1af68d1mr12349679pjb.121.1668756729566; Thu, 17 Nov 2022 23:32:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668756729; cv=none; d=google.com; s=arc-20160816; b=jqG3Ru2aVSM1F3PeAp/qeXaVzbxY7+0psKXmsAVOyqljXPM7WsmxS6Pf7K230zFcRX /S7OR1KzFNbT8Ssy53vjGEWKPw06bD2lTMb1crakUVf9CBZROotE8uheuWmhrsyfIQZf 5aHSY5FLGzhgc0f6iAGKPX78VtjiuhIvPl5tnc0LgTuMhLmgYGZquNf9MN7i0T1jaJPT Ax8poH6klx4McdtxFjHfUcfkzL1K0FZPI0QTPlVbBwAjqlpaf5xQipEnWWzTMko0e9qq rW45fdAtO8oIdaLsEAp2PQVY9hg4cH0Uvh4eH302W3NBltN2FLWWS9XbDeXhncwKEuXA f9pA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Wss4l8+ki3bcqZpf4pXWKdXS9Ah4/Shxx0wHVdp0ynM=; b=uSkHoo4YxQEhzuULFnXq9xxV8ka2o6Bd6oBIvt3cF1Z3PCtyNkoXQYqKOdYQEnbGn1 4ZKUq4ZnIQvIh7+1UBD9znk2Zp8t9/nqZIEuvRwsLoJcuwR+URC3C4sEk5TQqTAQPoaa oxxvZHSaVlgY3oZD3vuMaG9qNIsWfu6SUFk4xvnBUE5vP/H14/gyPAQ5Fq+z5AcKvESw k3kVnwr9zSE75yUDUdsWbQflkzr3HEgV1WPdNNO+r+rfmXHtVlrlmwErVkQFvjU+9Hhu z6uQghZmivZJ+xtsGUacIaWria+HEO5qzkBEV0IRqjEUpiLI3sssEiqFa9Y7zIG3bSe6 sqmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=ckE22BdR; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 9-20020a630c49000000b00473c5330abbsi3176652pgm.158.2022.11.17.23.31.55; Thu, 17 Nov 2022 23:32:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4-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=ckE22BdR; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-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 S241256AbiKRHbP (ORCPT + 99 others); Fri, 18 Nov 2022 02:31:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47414 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229620AbiKRHbD (ORCPT ); Fri, 18 Nov 2022 02:31:03 -0500 Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 63AB47D525; Thu, 17 Nov 2022 23:31:03 -0800 (PST) Received: by mail-pl1-x630.google.com with SMTP id g10so3833774plo.11; Thu, 17 Nov 2022 23:31:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Wss4l8+ki3bcqZpf4pXWKdXS9Ah4/Shxx0wHVdp0ynM=; b=ckE22BdRtTbcTpcAczDBDx142TEzFlzwaz45MGFZZgwWkx2w7J9ONyEK1YVTBtjfR6 RqbV2slZHKwdlqMT3lnVqoWGcRGASMPNbRG0a2ZrIDEaqZNX3aw9GppTxZWNyx6UaYyq /ZXWxeUL/0Ezt57Yz21sJQrooj599j6KBMdv/q/RYuFFdCIM4Yqt2Xr0oLGb5vXXsPOg r6eaZJ/pKRNO2dyZ4Bd5ISXKU7nzL84AoEDMUBU7Gw51pMl98qYM2mFUepjU9gkvOFX3 XxF7OVdMMEoAcAvgYU0CPiRt9xKcZFhO4Bnpn6/jj0RbAutl40YuQiuwkUsz0eBDueq8 YxHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Wss4l8+ki3bcqZpf4pXWKdXS9Ah4/Shxx0wHVdp0ynM=; b=ePkV4Lnc4v6UkaPIVXehfr2h0Gf+rFdKEe+dTL8hfKyJJ4BILKb9uW4Yj7IcuO2z5c fIWHmb2VqHclN4yjKRcEoNR8XGHFqyrFtdqIi2MW15/zVFqm1zVOZnTyDsPyTAo8fYi3 0BOdN0nQmyIP8OJo1alMpfnqOgeDQOzyPp0z13+zx3qyr1oT7FHFO6F+AFcYVrPm8oSZ biHxN21C3waXyePjPf645PX+cXNBFkMIi2T/HmOUobOKQiJY0gPGOZj2yNn6bGeiLU8H KbH2kj/o0v7SWPIiVhxrv8muAKb3p8CawLlwZluR+6HFHKPPHKPrnoknqq2Y9oqmAxpG jn5g== X-Gm-Message-State: ANoB5pneVgBtJ3Gwv8cXn3utorB+8aWjUVkZbQ1b3GMH5oH0uN7TCY5B 5rP6mqP1sSG1T+eBZvdJdSw= X-Received: by 2002:a17:902:c141:b0:186:c958:64f with SMTP id 1-20020a170902c14100b00186c958064fmr6370295plj.33.1668756662876; Thu, 17 Nov 2022 23:31:02 -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.31.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Nov 2022 23:31:02 -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 3/4] memory-failure: Convert truncate_error_page() to use folio Date: Thu, 17 Nov 2022 23:30:54 -0800 Message-Id: <20221118073055.55694-4-vishal.moola@gmail.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221118073055.55694-1-vishal.moola@gmail.com> References: <20221118073055.55694-1-vishal.moola@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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-ext4@vger.kernel.org Replaces try_to_release_page() with filemap_release_folio(). This change is in preparation for the removal of the try_to_release_page() wrapper. Signed-off-by: Vishal Moola (Oracle) Acked-by: Naoya Horiguchi --- mm/memory-failure.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mm/memory-failure.c b/mm/memory-failure.c index 145bb561ddb3..92ec9b0e58a3 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c @@ -827,12 +827,13 @@ static int truncate_error_page(struct page *p, unsigned long pfn, int ret = MF_FAILED; if (mapping->a_ops->error_remove_page) { + struct folio *folio = page_folio(p); int err = mapping->a_ops->error_remove_page(mapping, p); if (err != 0) { pr_info("%#lx: Failed to punch page: %d\n", pfn, err); - } else if (page_has_private(p) && - !try_to_release_page(p, GFP_NOIO)) { + } else if (folio_has_private(folio) && + !filemap_release_folio(folio, GFP_NOIO)) { pr_info("%#lx: failed to release buffers\n", pfn); } else { ret = MF_RECOVERED; -- 2.38.1