Received: by 2002:ab2:7855:0:b0:1f9:5764:f03e with SMTP id m21csp597012lqp; Wed, 22 May 2024 13:37:25 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUbc2h59m/jWYik9AkwBO7cGlzVlw+mIYkZzgavCpr7cip1+0P5aCu67ImQSkT70xSI8nPpiraELJSmZZ4vuayChC2ZZ5c9k2mHd8WNww== X-Google-Smtp-Source: AGHT+IGRJo7u2I20uZscuU1mkY9F3ga5+1jRIt0/R8v5sMiEgFtL6T1z0jrLy5PdMgr5ShZI2+hO X-Received: by 2002:a05:6a00:2354:b0:6f3:e9bc:cc3d with SMTP id d2e1a72fcca58-6f77256293bmr540799b3a.3.1716410245520; Wed, 22 May 2024 13:37:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716410245; cv=pass; d=google.com; s=arc-20160816; b=mD/wJnN5fZqaXS3jsHVx+fjOfLftQly1hiKahxi1wQZdNFjajX2ZIQK08GhUDr1IQN Ind3/xPi7ser9H8l2DPCrL1mtNpprqMLDHhjaiGez1rUveFXoVfN+RkYI8ba4zw6eHhg dmrFwtPhJQRWP2iRx6panGlDTrz4CHnOQ1Z0WoXzbHuMVQKd6lG61tuI/1kw4WyyQf4d tWbwWtvoOPPPhy1LDTDmXuVoQiOjW1TW8tFLjQYZ3S1wcvNlI6qYjnD1M8sJW13LJmqJ AyNprwXxhEIcTU9kNQ4Rw8ZO9LPinJeyVv7zYDuPfP9k2oMuF62zCTwhgoIZ74VXtQrH ROXQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=EFPuG7nVKvAPQ/CnOnEiZrvarreSpiNDxSaLFbrek7c=; fh=B1oV6Ev4LJ+QEflLoDBL5jdWxYFwEv9kYbLQ+K7fQFA=; b=iH1cPi2nwh3Vpmwss4rQ5hxZ/TmkcY1cwqP0pichGEoRTbvk6REmRL5fAG2kEcpOhc cD3B8htvP3YhQmE1dSTedW5OmqqdVH0BebM2Gaq3fpP71ZNjNpfoxC/dks9j90WIos7y 0kC0LJOcfSo9oDzG05x1t8AoQm3b7tpbqPysTflU979koQa9I5Kt59FJQvcsVBulxNLA +CqB7+2megnaGstYuBpdNPVj92C5BRGyyv8jhzQyQkyUMH7UVPFZzpZawl2q1jRZ7WDS owaCLea0CQwEqCaOjwZBW3lhshG9FNC+TB5rWzTuDRGusd5mtToJKV4LASG8z1yZlKqK tLfg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=upkC6KFD; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-nfs+bounces-3341-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-nfs+bounces-3341-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id d2e1a72fcca58-6f4d2a96aeasi4119979b3a.127.2024.05.22.13.37.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 May 2024 13:37:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs+bounces-3341-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=upkC6KFD; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-nfs+bounces-3341-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-nfs+bounces-3341-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 7F2FBB2126A for ; Wed, 22 May 2024 20:37:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 428937E575; Wed, 22 May 2024 20:37:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="upkC6KFD" X-Original-To: linux-nfs@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1552F41A80; Wed, 22 May 2024 20:37:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716410238; cv=none; b=SjjP76w1iZkYl852VZENzaMfEjVLxG8UHcG0lDy5eYDfIaY3/nsYkJ5EZHvQ7o9Id3jHQTBoxLmmipxqragU4G0cDF2ySKsXu9dSzvlJe8ZvcOSfENYi2MMVaFksX9o4SZmL/Ck0C+LskyLKhSKyOWRFdCOqDm7qyGLX6mfWIMI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716410238; c=relaxed/simple; bh=VcM8F2FPLqzgtpHQvCPz9zqv6y0dtpdMnsnBdC8UywQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=OIzQ8m6ueqUcjQQ7+HYHsmkonXgPozKmwLiA1Gay4Ailh2343l5ZakJv46eE4u6HNrEaBSyqm2vgnHrhkjNLVVQ8C83Rx03KMX+4emuzp+p8piTUcTm36bgXHZMX5VxuZUYsMa8yJxpmjZnMemA7/Wn0iHLnC6n0iB5aFoo57dk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=upkC6KFD; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 468E2C2BBFC; Wed, 22 May 2024 20:37:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1716410237; bh=VcM8F2FPLqzgtpHQvCPz9zqv6y0dtpdMnsnBdC8UywQ=; h=From:To:Cc:Subject:Date:From; b=upkC6KFDmfHYP3VzMMaSBzUNcNOZV8dVkWBbvXfSHMVVk/Za3Bqa7oCWE2YtUuRkL Je5IR3rwMYRUJmS8LC70S+eryHbpt3YhtB9MOUbRsykdlYCoJTCUhbhDa0Zg/uToIJ 5clW4PVneaeUKUdtRrYMlzCcoeTqQsB6AqWNVflJpI3vzj6LDVPO1IUHEsraMPTgLI v49xzLirxN1HmUQRN1Jbl5R6s17WSoDkg9u5/fZP0FS7Qfx2oJrFpo6Q6JzUEwUlza ZO6ahD55PUDebcaD7g79cIDGY0oMo8OoXShl24wiAskDn29n8XZjso+fZdt0yvHusi 5QWAgJs+pPxRA== From: trondmy@kernel.org To: Matthew Wilcox Cc: linux-fsdevel@vger.kernel.org, linux-nfs@vger.kernel.org Subject: [PATCH] filemap: Return the error in do_read_cache_page() Date: Wed, 22 May 2024 16:31:14 -0400 Message-ID: <20240522203115.27252-1-trondmy@kernel.org> X-Mailer: git-send-email 2.45.1 Precedence: bulk X-Mailing-List: linux-nfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Trond Myklebust If the call to do_read_cache_folio() returns an error, then we should pass that back to the caller of do_read_cache_page(). Fixes: 539a3322f208 ("filemap: Add read_cache_folio and read_mapping_folio") Signed-off-by: Trond Myklebust --- mm/filemap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/filemap.c b/mm/filemap.c index 30de18c4fd28..8f3b3604f73b 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -3812,7 +3812,7 @@ static struct page *do_read_cache_page(struct address_space *mapping, folio = do_read_cache_folio(mapping, index, filler, file, gfp); if (IS_ERR(folio)) - return &folio->page; + return ERR_CAST(folio); return folio_file_page(folio, index); } -- 2.45.1