lkml.org 
[lkml]   [2021]   [Jul]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v14 014/138] mm/filemap: Add folio_next_index()
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.

\
 
 \ /
  Last update: 2021-07-20 19:56    [W:0.603 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site