mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 12:43:29 +02: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 <willy@infradead.org>
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user