mm: Convert workingset to XArray
We construct an XA_STATE and use it to delete the node with xas_store() rather than adding a special function for this unique use case. Includes a test that simulates this usage for the test suite. Signed-off-by: Matthew Wilcox <willy@infradead.org>
This commit is contained in:
@@ -306,15 +306,6 @@ void workingset_update_node(struct xa_node *node);
|
||||
xas_set_update(xas, workingset_update_node); \
|
||||
} while (0)
|
||||
|
||||
/* Returns workingset_update_node() if the mapping has shadow entries. */
|
||||
#define workingset_lookup_update(mapping) \
|
||||
({ \
|
||||
radix_tree_update_node_t __helper = workingset_update_node; \
|
||||
if (dax_mapping(mapping) || shmem_mapping(mapping)) \
|
||||
__helper = NULL; \
|
||||
__helper; \
|
||||
})
|
||||
|
||||
/* linux/mm/page_alloc.c */
|
||||
extern unsigned long totalram_pages;
|
||||
extern unsigned long totalreserve_pages;
|
||||
|
Reference in New Issue
Block a user