[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210812122104.GB18532@lst.de>
Date: Thu, 12 Aug 2021 14:21:04 +0200
From: Christoph Hellwig <hch@....de>
To: David Howells <dhowells@...hat.com>
Cc: willy@...radead.org, trond.myklebust@...marydata.com,
darrick.wong@...cle.com, hch@....de, jlayton@...nel.org,
sfrench@...ba.org, torvalds@...ux-foundation.org,
linux-nfs@...r.kernel.org, linux-mm@...ck.org,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] mm: Make swap_readpage() for SWP_FS_OPS use
->direct_IO() not ->readpage()
On Thu, Aug 12, 2021 at 12:57:58PM +0100, David Howells wrote:
> Make swap_readpage(), when accessing a swap file (SWP_FS_OPS) use
> the ->direct_IO() method on the filesystem rather then ->readpage().
->direct_IO is just a helper for ->read_iter and ->write_iter, so please
don't call it directly. It actually is slowly on its way out, with at
at least all of the iomap implementations not using it, as well as various
other file systems.
> + ki = kzalloc(sizeof(*ki), GFP_KERNEL);
> + if (!ki)
> + return -ENOMEM;
for the synchronous case we could avoid this allocation and just use
arguments on stack.
Powered by blists - more mailing lists