[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZBSH6Uq6IIXON/rh@casper.infradead.org>
Date: Fri, 17 Mar 2023 15:31:53 +0000
From: Matthew Wilcox <willy@...radead.org>
To: Pankaj Raghav <p.raghav@...sung.com>
Cc: Christoph Hellwig <hch@...radead.org>, hubcap@...ibond.com,
senozhatsky@...omium.org, martin@...ibond.com, minchan@...nel.org,
viro@...iv.linux.org.uk, brauner@...nel.org, axboe@...nel.dk,
akpm@...ux-foundation.org, linux-kernel@...r.kernel.org,
linux-block@...r.kernel.org, linux-fsdevel@...r.kernel.org,
linux-mm@...ck.org, gost.dev@...sung.com, mcgrof@...nel.org,
devel@...ts.orangefs.org
Subject: Re: [RFC PATCH 1/3] filemap: convert page_endio to folio_endio
On Thu, Mar 16, 2023 at 11:04:54AM +0100, Pankaj Raghav wrote:
> - /* clean up. */
> - while ((page = readahead_page(rac))) {
> - page_endio(page, false, ret);
> - put_page(page);
> + while ((folio = readahead_folio(rac))) {
> + folio_clear_uptodate(folio);
> + folio_set_error(folio);
> + folio_unlock(folio);
> + }
> + return;
> + }
> +
> + while ((folio = readahead_folio(rac))) {
> + folio_mark_uptodate(folio);
> + folio_unlock(folio);
> }
readahead_folio() is a bit too heavy-weight for that, IMO. I'd do this
as;
while ((folio = readahead_folio(rac))) {
if (!ret)
folio_mark_uptodate(folio);
folio_unlock(folio);
}
(there's no need to call folio_set_error(), nor folio_clear_uptodate())
Powered by blists - more mailing lists