summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthew Wilcox <willy@infradead.org>2017-12-05 19:04:20 -0500
committerMatthew Wilcox <willy@infradead.org>2018-10-21 10:46:44 -0400
commita28334862993b5c6a8766f6963ee69048403817c (patch)
tree5b5e5d483ba7a24789c55fae89ff79c4a2efc6c6
parentb15cd800682fcaf27048b05e42f5c208e4c756c0 (diff)
downloadlinux-a28334862993b5c6a8766f6963ee69048403817c.tar.gz
page cache: Finish XArray conversion
With no more radix tree API users left, we can drop the GFP flags
and use xa_init() instead of INIT_RADIX_TREE().

Signed-off-by: Matthew Wilcox <willy@infradead.org>
-rw-r--r--fs/inode.c2
-rw-r--r--mm/swap_state.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/fs/inode.c b/fs/inode.c
index 42f6d25f32a5..9b808986d440 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -349,7 +349,7 @@ EXPORT_SYMBOL(inc_nlink);
 
 static void __address_space_init_once(struct address_space *mapping)
 {
-	INIT_RADIX_TREE(&mapping->i_pages, GFP_ATOMIC | __GFP_ACCOUNT);
+	xa_init_flags(&mapping->i_pages, XA_FLAGS_LOCK_IRQ);
 	init_rwsem(&mapping->i_mmap_rwsem);
 	INIT_LIST_HEAD(&mapping->private_list);
 	spin_lock_init(&mapping->private_lock);
diff --git a/mm/swap_state.c b/mm/swap_state.c
index f393c994cc60..31c45a25b2d3 100644
--- a/mm/swap_state.c
+++ b/mm/swap_state.c
@@ -586,7 +586,7 @@ int init_swap_address_space(unsigned int type, unsigned long nr_pages)
 		return -ENOMEM;
 	for (i = 0; i < nr; i++) {
 		space = spaces + i;
-		INIT_RADIX_TREE(&space->i_pages, GFP_ATOMIC|__GFP_NOWARN);
+		xa_init_flags(&space->i_pages, XA_FLAGS_LOCK_IRQ);
 		atomic_set(&space->i_mmap_writable, 0);
 		space->a_ops = &swap_aops;
 		/* swap cache doesn't use writeback related tags */