summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMatthew Wilcox <willy@infradead.org>2017-11-17 18:01:45 +0300
committerMatthew Wilcox <willy@infradead.org>2018-10-21 17:46:33 +0300
commit74d609585d8bd6083bd9d75bc1fd2c0d3851bcc5 (patch)
tree21b2c29ac80af601c6cdfcea2452fc2b9c00f617 /lib
parent0d3f92966629e536b0c5c2355c1ada8e21c245f6 (diff)
downloadlinux-74d609585d8bd6083bd9d75bc1fd2c0d3851bcc5.tar.xz
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>
Diffstat (limited to 'lib')
-rw-r--r--lib/radix-tree.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/radix-tree.c b/lib/radix-tree.c
index 68702061464f..8a58051eb5b3 100644
--- a/lib/radix-tree.c
+++ b/lib/radix-tree.c
@@ -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;