diff options
author | Hugh Dickins <hugh@veritas.com> | 2008-02-05 01:28:41 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-05 12:44:14 -0500 |
commit | 46017e954826ac59e91df76341a3f76b45467847 (patch) | |
tree | 711a35e3936118665d0eac2afeef8758b4f4e95f /mm/shmem.c | |
parent | c4cc6d07b2f465fbf5efd99bbe772a49c515f3f2 (diff) |
swapin_readahead: move and rearrange args
swapin_readahead has never sat well in mm/memory.c: move it to mm/swap_state.c
beside its kindred read_swap_cache_async. Why were its args in a different
order? rearrange them. And since it was always followed by a
read_swap_cache_async of the target page, fold that in and return struct
page*. Then CONFIG_SWAP=n no longer needs valid_swaphandles and
read_swap_cache_async stubs.
Signed-off-by: Hugh Dickins <hugh@veritas.com>
Acked-by: Rik van Riel <riel@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/shmem.c')
-rw-r--r-- | mm/shmem.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/mm/shmem.c b/mm/shmem.c index 88c6685f16b7..3a22a8f79331 100644 --- a/mm/shmem.c +++ b/mm/shmem.c | |||
@@ -1036,8 +1036,7 @@ static struct page *shmem_swapin(struct shmem_inode_info *info, | |||
1036 | pvma.vm_pgoff = idx; | 1036 | pvma.vm_pgoff = idx; |
1037 | pvma.vm_ops = NULL; | 1037 | pvma.vm_ops = NULL; |
1038 | pvma.vm_policy = mpol_shared_policy_lookup(&info->policy, idx); | 1038 | pvma.vm_policy = mpol_shared_policy_lookup(&info->policy, idx); |
1039 | swapin_readahead(entry, 0, &pvma); | 1039 | page = swapin_readahead(entry, &pvma, 0); |
1040 | page = read_swap_cache_async(entry, &pvma, 0); | ||
1041 | mpol_free(pvma.vm_policy); | 1040 | mpol_free(pvma.vm_policy); |
1042 | return page; | 1041 | return page; |
1043 | } | 1042 | } |
@@ -1067,8 +1066,7 @@ static inline int shmem_parse_mpol(char *value, int *policy, | |||
1067 | static inline struct page * | 1066 | static inline struct page * |
1068 | shmem_swapin(struct shmem_inode_info *info,swp_entry_t entry,unsigned long idx) | 1067 | shmem_swapin(struct shmem_inode_info *info,swp_entry_t entry,unsigned long idx) |
1069 | { | 1068 | { |
1070 | swapin_readahead(entry, 0, NULL); | 1069 | return swapin_readahead(entry, NULL, 0); |
1071 | return read_swap_cache_async(entry, NULL, 0); | ||
1072 | } | 1070 | } |
1073 | 1071 | ||
1074 | static inline struct page * | 1072 | static inline struct page * |