[patch 3/8] mm: shmem: save one radix tree lookup when truncating swapped pages

2013-10-10 Thread Johannes Weiner
Page cache radix tree slots are usually stabilized by the page lock, but shmem's swap cookies have no such thing. Because the overall truncation loop is lockless, the swap entry is currently confirmed by a tree lookup and then deleted by another tree lookup under the same tree lock region. Use

[patch 3/8] mm: shmem: save one radix tree lookup when truncating swapped pages

2013-10-10 Thread Johannes Weiner
Page cache radix tree slots are usually stabilized by the page lock, but shmem's swap cookies have no such thing. Because the overall truncation loop is lockless, the swap entry is currently confirmed by a tree lookup and then deleted by another tree lookup under the same tree lock region. Use