From mboxrd@z Thu Jan 1 00:00:00 1970 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7BFC9C433F5 for ; Fri, 27 May 2022 15:51:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353708AbiE0PvR (ORCPT ); Fri, 27 May 2022 11:51:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56440 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353680AbiE0PvK (ORCPT ); Fri, 27 May 2022 11:51:10 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C09A613B8C1 for ; Fri, 27 May 2022 08:51:09 -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=XjQP/FhIMNNRCHBvtTQpbw+sDJqqK43i6MI8xDK6ue4=; b=s/SNQOmeia3GYJViS3bMI/vt9F p1fx2sT3rnf6oVTVudcF+/ZPI83MYVnblbDR7d5iALZpV5fYuEmP75M9lQZCp+7F+MjBu+MKTU8Kr KMp5kmB8yCJiyKsSUrW1OVq5qWgE+eHSsRIDmvTMtBwqL3ZCP1yJmUNZu7eies+fgLLh1r4jmxJh4 MDGzcYx1T8GVus8gV7jHg+wzVvFtDNmJgoy78NGA1sj+U4HlTpuKiUKBNH0tumD+fCW3s5Eim5ipe O6abP0bvbUG1oZ8EddBj7G0qjrRc3gqNvyGVt9swuAckGmfALxap68pRqBLMAoXy9hPGONDpxdzLX ijeunrQQ==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nucEa-002CWa-RE; Fri, 27 May 2022 15:50:40 +0000 From: "Matthew Wilcox (Oracle)" To: linux-fsdevel@vger.kernel.org Cc: "Matthew Wilcox (Oracle)" , linux-mm@kvack.org Subject: [PATCH 08/24] ext2: Remove check for PageError Date: Fri, 27 May 2022 16:50:20 +0100 Message-Id: <20220527155036.524743-9-willy@infradead.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220527155036.524743-1-willy@infradead.org> References: <20220527155036.524743-1-willy@infradead.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org If read_mapping_page() encounters an error, it returns an errno, not a page with PageError set, so this test is not needed. Signed-off-by: Matthew Wilcox (Oracle) --- fs/ext2/dir.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/ext2/dir.c b/fs/ext2/dir.c index 2c2f179b6977..3410e4132405 100644 --- a/fs/ext2/dir.c +++ b/fs/ext2/dir.c @@ -204,8 +204,7 @@ static struct page * ext2_get_page(struct inode *dir, unsigned long n, if (!IS_ERR(page)) { *page_addr = kmap_local_page(page); if (unlikely(!PageChecked(page))) { - if (PageError(page) || !ext2_check_page(page, quiet, - *page_addr)) + if (!ext2_check_page(page, quiet, *page_addr)) goto fail; } } -- 2.34.1