Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2084501rwd; Fri, 26 May 2023 01:12:40 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5Dj+bCl3N6dgDXZTkitT9331xg9FIEzafMV2Lh7s5Pl7K7lH5b1HJxlcPqG+XRX2cHXJQC X-Received: by 2002:a17:902:db08:b0:1af:d6fb:199c with SMTP id m8-20020a170902db0800b001afd6fb199cmr5642016plx.16.1685088760113; Fri, 26 May 2023 01:12:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685088760; cv=none; d=google.com; s=arc-20160816; b=ltGLHEfvrALZBad5QpgZLHFewGROP3cO5ZVsIUTBDYmNE1k7+X4akmO4uXkOZ2pJLA RPFBSUsXeAgT8FusiDx5jfYRCGPKO4H54PhYQ+p1Cv5l2NmpeVxepHaNKCG12lBRQNpc Fo2/QVlZMlbtBTfjhOnpnw0GG6FS4d1rLUSBA4hfEKEdF9VIF97hxGmZy3N0E9RR9fTd IG8eLTk2QAlKpg+CcTOQ+xPwq5/JSeXT33wAMUyYJfESAujvW3bBLwn16cqWulsN8N4/ p0HZLG3V+gOwMLNtM8wvAyzrRjyxs1LKuP+BjD/MIPcZh23UghsQJcZQhDYo7+PP9m97 8F/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=BFzqBMItEZgQr8hCk3V5r6qhiIrmiWlEy/D5f4lnA2E=; b=CNBIuFLPkJrVFcAbFZpLQUAJAtnr+fGEp+UyERlBbVEeD+3JQBfAHbzg2yik4hBZUm rvzeeCyzaRS7yK85TQ8EjObNtsvYMC5+lOJnTcR93+IZXvfxQUcZT9ZBAN8czTBtyxsn njpaL/sVYXQoraXgyHUuMYhTrWAm1GyHMO9lkn0e1j1UoKLBxYnmtFz6wqz06XYM3Lth 69wMxg+KyUYhv80ryH8TttQJoil59etiP5rmxz5xkZp+tfr7TJ/rElwEbD1GgeN4fJT+ GAnZibL4A7ovc7ljCLzUnA/Lbb46ROHGWVT1KKTmXxyPpolehaFzOZEn4Tb47JE+Nfvc hQcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=pl0lkfgo; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w16-20020a17090a8a1000b002535c437f9fsi3703391pjn.33.2023.05.26.01.12.27; Fri, 26 May 2023 01:12:40 -0700 (PDT) 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=@infradead.org header.s=bombadil.20210309 header.b=pl0lkfgo; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242588AbjEZH4J (ORCPT + 99 others); Fri, 26 May 2023 03:56:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47302 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242575AbjEZH4H (ORCPT ); Fri, 26 May 2023 03:56:07 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ADE0518D; Fri, 26 May 2023 00:56:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description; bh=BFzqBMItEZgQr8hCk3V5r6qhiIrmiWlEy/D5f4lnA2E=; b=pl0lkfgoZtZTjPznudekY5HK9v zjooPlpEqlCsqaFtZOKe2oOkIsjXewFeAQUggQ0csrXmSEg/LbbbdByZrqoA1JUWEE/IU4kNuymSJ 2PQI3eei+8ip/2EgJUWqJQ6fyolpTquvIN/Of0kbRh1En7RzoMnd5svO6VEDqQ5FNLqtaeoergkmA daR7xOt3hf8BaukiXWg6nQ/9K/UWIgZ0z4x0y7N0NMwIzBK8u4CbLDUJKSFkxKC+aR8FG7TqHLNvl 4k8J+vfFgnEXegtEH6jRcR3cZIkGRcxjX4qlO5MaTXcafNcifBPHAdfH3KlUS18vB41SdwI5z1HLe vCHZUpSw==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1q2SIj-001WZj-2b; Fri, 26 May 2023 07:55:53 +0000 From: Luis Chamberlain To: hughd@google.com, akpm@linux-foundation.org, willy@infradead.org, brauner@kernel.org, djwong@kernel.org Cc: p.raghav@samsung.com, da.gomez@samsung.com, rohan.puri@samsung.com, rpuri.linux@gmail.com, a.manzanares@samsung.com, dave@stgolabs.net, yosryahmed@google.com, keescook@chromium.org, hare@suse.de, kbusch@kernel.org, mcgrof@kernel.org, patches@lists.linux.dev, linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [RFC v2 2/8] shmem: convert to use is_folio_hwpoison() Date: Fri, 26 May 2023 00:55:46 -0700 Message-Id: <20230526075552.363524-3-mcgrof@kernel.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230526075552.363524-1-mcgrof@kernel.org> References: <20230526075552.363524-1-mcgrof@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: Luis Chamberlain X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED 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 The PageHWPoison() call can be converted over to the respective folio call is_folio_hwpoison(). This introduces no functional changes. Signed-off-by: Luis Chamberlain --- mm/shmem.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mm/shmem.c b/mm/shmem.c index 351803415ad2..a947f2678a39 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -3360,7 +3360,7 @@ static const char *shmem_get_link(struct dentry *dentry, folio = filemap_get_folio(inode->i_mapping, 0); if (IS_ERR(folio)) return ERR_PTR(-ECHILD); - if (PageHWPoison(folio_page(folio, 0)) || + if (is_folio_hwpoison(folio) || !folio_test_uptodate(folio)) { folio_put(folio); return ERR_PTR(-ECHILD); @@ -3371,7 +3371,7 @@ static const char *shmem_get_link(struct dentry *dentry, return ERR_PTR(error); if (!folio) return ERR_PTR(-ECHILD); - if (PageHWPoison(folio_page(folio, 0))) { + if (is_folio_hwpoison(folio)) { folio_unlock(folio); folio_put(folio); return ERR_PTR(-ECHILD); @@ -4548,7 +4548,7 @@ struct page *shmem_read_mapping_page_gfp(struct address_space *mapping, return &folio->page; page = folio_file_page(folio, index); - if (PageHWPoison(page)) { + if (is_folio_hwpoison(folio)) { folio_put(folio); return ERR_PTR(-EIO); } -- 2.39.2