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=-10.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 C36C8C07E9B for ; Tue, 20 Jul 2021 17:56:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AAB2A610F7 for ; Tue, 20 Jul 2021 17:56:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232938AbhGTRPw (ORCPT ); Tue, 20 Jul 2021 13:15:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33398 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232159AbhGTRPN (ORCPT ); Tue, 20 Jul 2021 13:15:13 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 74DBAC061574; Tue, 20 Jul 2021 10:55:51 -0700 (PDT) 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: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.