lkml.org 
[lkml]   [2021]   [Mar]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4 10/25] mm/util: Add folio_mapping and folio_file_mapping
> +struct address_space *page_mapping(struct page *);
> +struct address_space *folio_mapping(struct folio *);
> +struct address_space *__folio_file_mapping(struct folio *);
> +
> +static inline struct address_space *folio_file_mapping(struct folio *folio)
> +{
> + if (unlikely(FolioSwapCache(folio)))
> + return __folio_file_mapping(folio);

I think __folio_file_mapping is badly misnamed as it only deals with
swapcache folios. Maybe that should be reflected in the name?

Also for all these funtions documentation would be very helpful, even if
the existing struct page based helpers don't have that either.

\
 
 \ /
  Last update: 2021-03-17 18:27    [W:0.481 / U:0.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site