diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-12-14 01:35:58 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-12-14 01:35:58 +0100 |
commit | 880b9df1bf157dc28a2e65beea6183d095e0ccb0 (patch) | |
tree | 4b02c486ad69782a0472e2253e33c322a7b960db /mm | |
parent | Merge tag 'linux-kselftest-4.20-rc7' of git://git.kernel.org/pub/scm/linux/ke... (diff) | |
parent | XArray: Fix xa_alloc when id exceeds max (diff) | |
download | linux-880b9df1bf157dc28a2e65beea6183d095e0ccb0.tar.xz linux-880b9df1bf157dc28a2e65beea6183d095e0ccb0.zip |
Merge tag 'xarray-4.20-rc7' of git://git.infradead.org/users/willy/linux-dax
Pull XArray fixes from Matthew Wilcox:
"Two bugfixes, each with test-suite updates, two improvements to the
test-suite without associated bugs, and one patch adding a missing
API"
* tag 'xarray-4.20-rc7' of git://git.infradead.org/users/willy/linux-dax:
XArray: Fix xa_alloc when id exceeds max
XArray tests: Check iterating over multiorder entries
XArray tests: Handle larger indices more elegantly
XArray: Add xa_cmpxchg_irq and xa_cmpxchg_bh
radix tree: Don't return retry entries from lookup
Diffstat (limited to 'mm')
-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, { void *old; - xa_lock_irq(&mapping->i_pages); - old = __xa_cmpxchg(&mapping->i_pages, index, radswap, NULL, 0); - xa_unlock_irq(&mapping->i_pages); + old = xa_cmpxchg_irq(&mapping->i_pages, index, radswap, NULL, 0); if (old != radswap) return -ENOENT; free_swap_and_cache(radix_to_swp_entry(radswap)); |