From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3CB6FC4338F for ; Tue, 24 Aug 2021 14:07:13 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C1F9A610F8 for ; Tue, 24 Aug 2021 14:07:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org C1F9A610F8 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 4CD068D0003; Tue, 24 Aug 2021 10:07:12 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 47C768D0001; Tue, 24 Aug 2021 10:07:12 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 36B8B8D0003; Tue, 24 Aug 2021 10:07:12 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0022.hostedemail.com [216.40.44.22]) by kanga.kvack.org (Postfix) with ESMTP id 1D8578D0001 for ; Tue, 24 Aug 2021 10:07:12 -0400 (EDT) Received: from smtpin38.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id C03C723E61 for ; Tue, 24 Aug 2021 14:07:11 +0000 (UTC) X-FDA: 78510151062.38.ABD2800 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf02.hostedemail.com (Postfix) with ESMTP id 59C777001701 for ; Tue, 24 Aug 2021 14:07:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=Xqja1HTyBUf8uuKLULMlLCkspx2KkmGFa3M60ugx7SA=; b=nkiCR5PXnBI2kOYu9sWcekaCWQ yKWpqOl2UlffS0bJ1kSpjldLoczjJkX2SBHFwC8X6bJaoME7zkHjTcZNHQ7UNBUbwLmhCaq4dRmFd vMoraImRqOd/nXBYw/Il1WUhTXACqmnzsjuT8YdaLMKDpmIv4kQsIMiW80XpAN+0xUjtn8EkmvNGM ktdWjL54SQgz7IEevZKCwsKmdsc9EvDz6hq1RWi9zlkM37z5wQHI4Uh8P6WZBDhRNzubIEWuJvpdL BhF0KvKZPmK+uKVqfX1fqnR/io3we8J0AgKiBsSqoYQUF/jyHow1DXSfBRTzX0zL4nds6HkJq2tTZ 4lm9BWzQ==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1mIX1d-00B8bA-27; Tue, 24 Aug 2021 14:03:52 +0000 Date: Tue, 24 Aug 2021 15:03:37 +0100 From: Matthew Wilcox To: David Howells Cc: Jeff Layton , Ilya Dryomov , linux-fsdevel@vger.kernel.org, linux-cachefs@redhat.com, linux-afs@lists.infradead.org, linux-nfs@vger.kernel.org, linux-cifs@vger.kernel.org, ceph-devel@vger.kernel.org, v9fs-developer@lists.sourceforge.net, devel@lists.orangefs.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 3/6] folio: Add a function to get the host inode for a folio Message-ID: References: <162981147473.1901565.1455657509200944265.stgit@warthog.procyon.org.uk> <162981151155.1901565.7010079316994382707.stgit@warthog.procyon.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <162981151155.1901565.7010079316994382707.stgit@warthog.procyon.org.uk> Authentication-Results: imf02.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=nkiCR5PX; dmarc=none; spf=none (imf02.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 59C777001701 X-Stat-Signature: bpy7dcus3177da99jyp8ez6ntohgzxkr X-HE-Tag: 1629814031-705155 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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.