]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mm/zswap.c: get swapper address_space by using macro
authorSunghan Suh <sunghan.suh@samsung.com>
Thu, 18 Jul 2013 23:56:43 +0000 (09:56 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 18 Jul 2013 23:56:43 +0000 (09:56 +1000)
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.

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>
mm/zswap.c

index deda2b671e128600c817714754a6d58decb0c50a..efed4c8b7f5b82caa0f183cad2751de12a2b4082 100644 (file)
@@ -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;