diff options
Diffstat (limited to 'mm/shmem.c')
-rw-r--r-- | mm/shmem.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/mm/shmem.c b/mm/shmem.c index 921f80488bb3..5d07e0b1352f 100644 --- a/mm/shmem.c +++ b/mm/shmem.c | |||
@@ -661,9 +661,7 @@ static int shmem_free_swap(struct address_space *mapping, | |||
661 | { | 661 | { |
662 | void *old; | 662 | void *old; |
663 | 663 | ||
664 | xa_lock_irq(&mapping->i_pages); | 664 | old = xa_cmpxchg_irq(&mapping->i_pages, index, radswap, NULL, 0); |
665 | old = __xa_cmpxchg(&mapping->i_pages, index, radswap, NULL, 0); | ||
666 | xa_unlock_irq(&mapping->i_pages); | ||
667 | if (old != radswap) | 665 | if (old != radswap) |
668 | return -ENOENT; | 666 | return -ENOENT; |
669 | free_swap_and_cache(radix_to_swp_entry(radswap)); | 667 | free_swap_and_cache(radix_to_swp_entry(radswap)); |