summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSunghan Suh <sunghan.suh@samsung.com>2013-09-11 14:20:22 -0700
committerChanho Park <chanho61.park@samsung.com>2014-03-20 17:44:39 +0900
commitf9fa0adf82695b4765d6b0845d1805424e953513 (patch)
tree5ac7b37fde7ab690903f832c1bc029581b8f87ce
parent0515721df12bf7f3378966b040c56d759c082de1 (diff)
downloadlinux-3.10-f9fa0adf82695b4765d6b0845d1805424e953513.tar.gz
linux-3.10-f9fa0adf82695b4765d6b0845d1805424e953513.tar.bz2
linux-3.10-f9fa0adf82695b4765d6b0845d1805424e953513.zip
mm/zswap.c: get swapper address_space by using macro
There is a proper macro to get the corresponding swapper address space from a swap entry. Instead of directly accessing "swapper_spaces" array, use the "swap_address_space" macro. Change-Id: I145f9a3fad914ff83853cd80c60af61f40eab1cf Signed-off-by: Sunghan Suh <sunghan.suh@samsung.com> Reviewed-by: Bob Liu <bob.liu@oracle.com> Reviewed-by: Wanpeng Li <liwanp@linux.vnet.ibm.com> Acked-by: Seth Jennings <sjenning@linux.vnet.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--mm/zswap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/zswap.c b/mm/zswap.c
index deda2b671e1..efed4c8b7f5 100644
--- a/mm/zswap.c
+++ b/mm/zswap.c
@@ -409,7 +409,7 @@ static int zswap_get_swap_cache_page(swp_entry_t entry,
struct page **retpage)
{
struct page *found_page, *new_page = NULL;
- struct address_space *swapper_space = &swapper_spaces[swp_type(entry)];
+ struct address_space *swapper_space = swap_address_space(entry);
int err;
*retpage = NULL;