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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 77B67C43217 for ; Fri, 27 May 2022 15:50:47 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9A6508D0026; Fri, 27 May 2022 11:50:44 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8E0628D0025; Fri, 27 May 2022 11:50:44 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 57A9F8D0028; Fri, 27 May 2022 11:50:44 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 3247D8D001E for ; Fri, 27 May 2022 11:50:44 -0400 (EDT) Received: from smtpin28.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id F0DE220BB0 for ; Fri, 27 May 2022 15:50:43 +0000 (UTC) X-FDA: 79511960766.28.2C01347 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf04.hostedemail.com (Postfix) with ESMTP id 1B5AF40054 for ; Fri, 27 May 2022 15:50:25 +0000 (UTC) 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=gf5p2e+qdxhVcf8PVIs5vyx8mN40hpMkTkem7ExcQzs=; b=lhiGc57FtMXrLSprJ/6hdRf3UW /QO1rjDpI/C4ozMk+kJ5STb81l/0bkIhTZQcA61j2aKYjcRwzk/5YJiTsco8qhqfespCd9Ir8UuC3 yfkvBGaoPMqbRD66WRMs0rBh12+Ed9qtiLYnW48tZQJaGV8Zd0Ia7TqA64I0hkR9ys4B9YuBvOYLf Wne+gRuJY61q/a1JjdEq/9h4JmjPrFe8pW53fgwzFSEYnyvBZGbBo0p9kyLLiT2cRhdV+8vr3uUcf cnjF3BEbq1XdY5Vv96wUcsW9LTnSmEWeekBg8qZdHoOllnZ1FNj8CKua5Jjf/G8H7Ml6E82icQiEc d+H4PLjQ==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nucEb-002CXL-Mx; Fri, 27 May 2022 15:50:41 +0000 From: "Matthew Wilcox (Oracle)" To: linux-fsdevel@vger.kernel.org Cc: "Matthew Wilcox (Oracle)" , linux-mm@kvack.org Subject: [PATCH 17/24] orangefs: Remove test for folio error Date: Fri, 27 May 2022 16:50:29 +0100 Message-Id: <20220527155036.524743-18-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 X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 1B5AF40054 X-Stat-Signature: 8dxgja7eneme531ojamwf6qbyuskr7wo X-Rspam-User: Authentication-Results: imf04.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=lhiGc57F; spf=none (imf04.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none X-HE-Tag: 1653666625-869816 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: The page cache clears the error bit before calling ->read_folio(), so this condition could never have been true. Signed-off-by: Matthew Wilcox (Oracle) --- fs/orangefs/inode.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/fs/orangefs/inode.c b/fs/orangefs/inode.c index 5ce27dde3c79..7a8c0c6e698d 100644 --- a/fs/orangefs/inode.c +++ b/fs/orangefs/inode.c @@ -307,7 +307,7 @@ static int orangefs_read_folio(struct file *file, struct folio *folio) ret = wait_for_direct_io(ORANGEFS_IO_READ, inode, &off, &iter, folio_size(folio), inode->i_size, NULL, NULL, file); - /* this will only zero remaining unread portions of the page data */ + /* this will only zero remaining unread portions of the folio data */ iov_iter_zero(~0U, &iter); /* takes care of potential aliasing */ flush_dcache_folio(folio); @@ -315,8 +315,6 @@ static int orangefs_read_folio(struct file *file, struct folio *folio) folio_set_error(folio); } else { folio_mark_uptodate(folio); - if (folio_test_error(folio)) - folio_clear_error(folio); ret = 0; } /* unlock the folio after the ->read_folio() routine completes */ -- 2.34.1