aboutsummaryrefslogtreecommitdiffstats
path: root/mm/swapfile.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/swapfile.c')
-rw-r--r--mm/swapfile.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/mm/swapfile.c b/mm/swapfile.c
index f2824c3c31b4..cc367f7e75d8 100644
--- a/mm/swapfile.c
+++ b/mm/swapfile.c
@@ -1477,8 +1477,7 @@ asmlinkage long sys_swapon(const char __user * specialfile, int swap_flags)
1477 error = -EINVAL; 1477 error = -EINVAL;
1478 goto bad_swap; 1478 goto bad_swap;
1479 } 1479 }
1480 page = read_cache_page(mapping, 0, 1480 page = read_mapping_page(mapping, 0, swap_file);
1481 (filler_t *)mapping->a_ops->readpage, swap_file);
1482 if (IS_ERR(page)) { 1481 if (IS_ERR(page)) {
1483 error = PTR_ERR(page); 1482 error = PTR_ERR(page);
1484 goto bad_swap; 1483 goto bad_swap;