Skip to content

Commit

Permalink
mm/zswap.c: get swapper address_space by using macro
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Sunghan Suh authored and Linus Torvalds committed Sep 11, 2013
1 parent e868677 commit 822518d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mm/zswap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 822518d

Please sign in to comment.