[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YST8OcVNy02Rivbm@casper.infradead.org>
Date: Tue, 24 Aug 2021 15:03:37 +0100
From: Matthew Wilcox <willy@...radead.org>
To: David Howells <dhowells@...hat.com>
Cc: Jeff Layton <jlayton@...nel.org>,
Ilya Dryomov <idryomov@...il.com>,
linux-fsdevel@...r.kernel.org, linux-cachefs@...hat.com,
linux-afs@...ts.infradead.org, linux-nfs@...r.kernel.org,
linux-cifs@...r.kernel.org, ceph-devel@...r.kernel.org,
v9fs-developer@...ts.sourceforge.net, devel@...ts.orangefs.org,
linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/6] folio: Add a function to get the host inode for a
folio
On Tue, Aug 24, 2021 at 02:25:11PM +0100, David Howells wrote:
> + * For folios which are in the page cache, return the inode that is hosting
> + * this folio belongs to.
> + *
> + * Do not call this for folios which aren't in the page cache.
> + */
> +static inline struct inode *folio_inode(struct folio *folio)
> +{
> + return folio_file_mapping(folio)->host;
You're contradicting yourself here. If you're allowed to call this
function for swap cache pages, then the documentation needs to change.
If you're not, then we can just use folio->mapping->host.
Powered by blists - more mailing lists