mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
lib: radix-tree: update callback for changing leaf nodes
Support handing __radix_tree_replace() a callback that gets invoked for all leaf nodes that change or get freed as a result of the slot replacement, to assist users tracking nodes with node->private_list. This prepares for putting page cache shadow entries into the radix tree root again and drastically simplifying the shadow tracking. Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Johannes Weiner <[email protected]> Suggested-by: Jan Kara <[email protected]> Reviewed-by: Jan Kara <[email protected]> Cc: Kirill A. Shutemov <[email protected]> Cc: Hugh Dickins <[email protected]> Cc: Matthew Wilcox <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
f4b109c6da
commit
4d693d0860
4 changed files with 36 additions and 16 deletions
|
|
@ -311,7 +311,8 @@ static int shmem_radix_tree_replace(struct address_space *mapping,
|
|||
return -ENOENT;
|
||||
if (item != expected)
|
||||
return -ENOENT;
|
||||
__radix_tree_replace(&mapping->page_tree, node, pslot, replacement);
|
||||
__radix_tree_replace(&mapping->page_tree, node, pslot,
|
||||
replacement, NULL, NULL);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue