linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: trondmy@kernel.org
Cc: linux-fsdevel@vger.kernel.org, linux-nfs@vger.kernel.org
Subject: Re: [PATCH] filemap: Return the error in do_read_cache_page()
Date: Wed, 22 May 2024 21:41:10 +0100	[thread overview]
Message-ID: <Zk5YZqwrBptULWO0@casper.infradead.org> (raw)
In-Reply-To: <20240522203115.27252-1-trondmy@kernel.org>

On Wed, May 22, 2024 at 04:31:14PM -0400, trondmy@kernel.org wrote:
> From: Trond Myklebust <trond.myklebust@hammerspace.com>
> 
> 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().

this patch is a no-op.  it generates exactly the same code.
only now it doesn't have the '&folio->page' signature that lets everyone
know it's part of the compat code.

> Fixes: 539a3322f208 ("filemap: Add read_cache_folio and read_mapping_folio")
> Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
> ---
>  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
> 

      reply	other threads:[~2024-05-22 20:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-22 20:31 [PATCH] filemap: Return the error in do_read_cache_page() trondmy
2024-05-22 20:41 ` Matthew Wilcox [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Zk5YZqwrBptULWO0@casper.infradead.org \
    --to=willy@infradead.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=trondmy@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).