• Matthew Wilcox (Oracle)'s avatar
    XArray: Update the LRU list in xas_split() · 3ed4bb77
    Matthew Wilcox (Oracle) authored
    When splitting a value entry, we may need to add the new nodes to the LRU
    list and remove the parent node from the LRU list.  The WARN_ON checks
    in shadow_lru_isolate() catch this oversight.  This bug was latent
    until we stopped splitting folios in shrink_page_list() with commit
    820c4e2e ("mm/vmscan: Free non-shmem folios without splitting them").
    That allows the creation of large shadow entries, and subsequently when
    trying to page in a small page, we will split the large shadow entry
    in __filemap_add_folio().
    
    Fixes: 8fc75643 ("XArray: add xas_split")
    Reported-by: default avatarHugh Dickins <hughd@google.com>
    Signed-off-by: default avatarMatthew Wilcox (Oracle) <willy@infradead.org>
    3ed4bb77
xarray.c 58.6 KB