lkml.org 
[lkml]   [2021]   [Jun]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v2 02/46] mm: Add folio_rmapping()
    > +static inline void *folio_rmapping(struct folio *folio)

    This name, just like the old one is not exaclty descriptive. I guess the
    r stands for raw somehow? As a casual contributor to the fringes of the
    MM I would have no idea when to use it.

    All this of course also applies to the existing (__)page_rmapping, but
    maybe this is a good time to sort it out.

    >
    > struct anon_vma *page_anon_vma(struct page *page)
    > {
    > + struct folio *folio = page_folio(page);
    > + unsigned long mapping = (unsigned long)folio->mapping;
    >
    > if ((mapping & PAGE_MAPPING_FLAGS) != PAGE_MAPPING_ANON)
    > return NULL;
    > + return folio_rmapping(folio);

    It feelds kinda silly to not just open code folio_rmapping here
    given that we alredy went half the way.

    \
     
     \ /
      Last update: 2021-06-23 09:59    [W:2.941 / U:0.300 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site