summaryrefslogtreecommitdiff
path: root/mm/shmem.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/shmem.c')
-rw-r--r--mm/shmem.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/mm/shmem.c b/mm/shmem.c
index 1c702f6f1241..32f6763f16fb 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -332,10 +332,14 @@ repeat:
if (unlikely(!page))
continue;
if (radix_tree_exception(page)) {
- if (radix_tree_exceptional_entry(page))
- goto export;
- /* radix_tree_deref_retry(page) */
- goto restart;
+ if (radix_tree_deref_retry(page))
+ goto restart;
+ /*
+ * Otherwise, we must be storing a swap entry
+ * here as an exceptional entry: so return it
+ * without attempting to raise page count.
+ */
+ goto export;
}
if (!page_cache_get_speculative(page))
goto repeat;