mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
page cache: Add and replace pages using the XArray
Use the XArray APIs to add and replace pages in the page cache. This removes two uses of the radix tree preload API and is significantly shorter code. It also removes the last user of __radix_tree_create() outside radix-tree.c itself, so make it static. Signed-off-by: Matthew Wilcox <[email protected]>
This commit is contained in:
parent
0d3f929666
commit
74d609585d
4 changed files with 66 additions and 90 deletions
|
|
@ -700,9 +700,9 @@ static bool delete_node(struct radix_tree_root *root,
|
|||
*
|
||||
* Returns -ENOMEM, or 0 for success.
|
||||
*/
|
||||
int __radix_tree_create(struct radix_tree_root *root, unsigned long index,
|
||||
unsigned order, struct radix_tree_node **nodep,
|
||||
void __rcu ***slotp)
|
||||
static int __radix_tree_create(struct radix_tree_root *root,
|
||||
unsigned long index, unsigned order,
|
||||
struct radix_tree_node **nodep, void __rcu ***slotp)
|
||||
{
|
||||
struct radix_tree_node *node = NULL, *child;
|
||||
void __rcu **slot = (void __rcu **)&root->xa_head;
|
||||
|
|
|
|||
Loading…
Reference in a new issue