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=-8.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=ham 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 9A51AC07E9B for ; Tue, 20 Jul 2021 17:56:02 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4CDD1610F7 for ; Tue, 20 Jul 2021 17:56:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4CDD1610F7 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id E27D76B0036; Tue, 20 Jul 2021 13:56:02 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id DD7E86B0070; Tue, 20 Jul 2021 13:56:02 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C78FD6B0071; Tue, 20 Jul 2021 13:56:02 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0129.hostedemail.com [216.40.44.129]) by kanga.kvack.org (Postfix) with ESMTP id A3F0E6B0036 for ; Tue, 20 Jul 2021 13:56:02 -0400 (EDT) Received: from smtpin19.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 2558318021872 for ; Tue, 20 Jul 2021 17:56:01 +0000 (UTC) X-FDA: 78383719722.19.3A9B87D Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf25.hostedemail.com (Postfix) with ESMTP id 5EEA9B000197 for ; Tue, 20 Jul 2021 17:56:00 +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=oDAJ42dv5UM7XR2QM94ynNYpWgzAJSt3LgUls9TMDrA=; b=iI3D7zk0Eux8BZ3+/5gXEBCIkU V7ksq2N37ISwvTSZKYLGaQKxw4tVV1OfJ0mQ2pr88p2jBqzQoovqGyH+UaJGpH3PeMpuoc4thidA+ 2hQX3PjKZBfcT9hGj5YsnVjFlBRk0njEXAXTRZVZmiqwbvcUgnQLg4fEcz0HDsRtsfgxGYh00OF67 R2a3e4Uu9husSNqcuY1qYLWMQOqYfohQtodkDq9js4MCWvx5hbLvDVmxPhcPkgDXJTj9JmtM3qNYh EIMRIxMepEYobhn9xutI0g4wN9naS/UA1wyHe62gx3U43WMKZ3G9IAj+xF5z03QFg3RoR48GUpkFy JVFVl1Uw==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1m5txY-008NQ7-FL; Tue, 20 Jul 2021 17:55:17 +0000 Date: Tue, 20 Jul 2021 18:55:12 +0100 From: Matthew Wilcox To: Mike Rapoport Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, Christoph Hellwig , Jeff Layton , "Kirill A . Shutemov" , Vlastimil Babka , William Kucharski , David Howells Subject: Re: [PATCH v14 014/138] mm/filemap: Add folio_next_index() Message-ID: References: <20210715033704.692967-1-willy@infradead.org> <20210715033704.692967-15-willy@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=iI3D7zk0; spf=none (imf25.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none X-Stat-Signature: oxaypp1babe38mka7ss95o4ggu14s3je X-Rspamd-Queue-Id: 5EEA9B000197 X-Rspamd-Server: rspam01 X-HE-Tag: 1626803760-225721 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, Jul 20, 2021 at 01:42:11PM +0300, Mike Rapoport wrote: > > diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h > > index f7c165b5991f..bd0e7e91bfd4 100644 > > --- a/include/linux/pagemap.h > > +++ b/include/linux/pagemap.h > > @@ -406,6 +406,17 @@ static inline pgoff_t folio_index(struct folio *folio) > > return folio->index; > > } > > > > +/** > > + * folio_next_index - Get the index of the next folio. > > + * @folio: The current folio. > > + * > > + * Return: The index of the folio which follows this folio in the file. > > + */ > > Maybe note that index is in units of pages? I don't think this is the place to explain that. Remember, we already have: * @index: Offset within the file, in units of pages. For anonymous pages, * this is the index from the beginning of the mmap. and I don't want to explain every term of art in every function description. I think if you're reading this, you can follow the link to the struct folio description and see what an index is.