aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorPekka Enberg <penberg@cs.helsinki.fi>2006-06-23 05:05:08 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-23 10:43:02 -0400
commit090d2b185d8680fc26a2eaf4245d4171dcf4baf1 (patch)
tree67e604e3cd1bad3cfd034bced19a0fbff6a80c30 /mm
parentc330dda908b5a46469a997eea90b66f2f9f02b34 (diff)
[PATCH] read_mapping_page for address space
Add read_mapping_page() which is used for callers that pass mapping->a_ops->readpage as the filler for read_cache_page. This removes some duplication from filesystem code. Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'mm')
-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;