Re: [PATCH v14 014/138] mm/filemap: Add folio_next_index()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread 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.




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux