Commit a2833486 authored by Matthew Wilcox's avatar Matthew Wilcox

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: default avatarMatthew Wilcox <willy@infradead.org>
parent b15cd800
...@@ -349,7 +349,7 @@ EXPORT_SYMBOL(inc_nlink); ...@@ -349,7 +349,7 @@ EXPORT_SYMBOL(inc_nlink);
static void __address_space_init_once(struct address_space *mapping) 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_rwsem(&mapping->i_mmap_rwsem);
INIT_LIST_HEAD(&mapping->private_list); INIT_LIST_HEAD(&mapping->private_list);
spin_lock_init(&mapping->private_lock); spin_lock_init(&mapping->private_lock);
......
...@@ -586,7 +586,7 @@ int init_swap_address_space(unsigned int type, unsigned long nr_pages) ...@@ -586,7 +586,7 @@ int init_swap_address_space(unsigned int type, unsigned long nr_pages)
return -ENOMEM; return -ENOMEM;
for (i = 0; i < nr; i++) { for (i = 0; i < nr; i++) {
space = spaces + 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); atomic_set(&space->i_mmap_writable, 0);
space->a_ops = &swap_aops; space->a_ops = &swap_aops;
/* swap cache doesn't use writeback related tags */ /* swap cache doesn't use writeback related tags */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment