#include <linux/sched.h>
#include <linux/security.h>
#include <linux/swap.h>
+#include <linux/swapops.h>
#include <asm/uaccess.h>
#include "internal.h"
VM_BUG_ON(PageSlab(page));
#ifdef CONFIG_SWAP
- if (unlikely(PageSwapCache(page)))
- mapping = &swapper_space;
- else
+ if (unlikely(PageSwapCache(page))) {
+ swp_entry_t entry;
+
+ entry.val = page_private(page);
+ mapping = swap_address_space(entry);
+ } else
#endif
if ((unsigned long)mapping & PAGE_MAPPING_ANON)
mapping = NULL;