Message ID | 20180117202203.19756-43-willy@infradead.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/mm/shmem.c b/mm/shmem.c index fad6c9e7402e..654f367aca90 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -348,12 +348,7 @@ static int shmem_xa_replace(struct address_space *mapping, static bool shmem_confirm_swap(struct address_space *mapping, pgoff_t index, swp_entry_t swap) { - void *item; - - rcu_read_lock(); - item = radix_tree_lookup(&mapping->pages, index); - rcu_read_unlock(); - return item == swp_to_radix_entry(swap); + return xa_load(&mapping->pages, index) == swp_to_radix_entry(swap); } /*