mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
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 <[email protected]> Acked-by: Rik van Riel <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
c4cc6d07b2
commit
46017e9548
4 changed files with 57 additions and 60 deletions
|
|
@ -1036,8 +1036,7 @@ static struct page *shmem_swapin(struct shmem_inode_info *info,
|
|||
pvma.vm_pgoff = idx;
|
||||
pvma.vm_ops = NULL;
|
||||
pvma.vm_policy = mpol_shared_policy_lookup(&info->policy, idx);
|
||||
swapin_readahead(entry, 0, &pvma);
|
||||
page = read_swap_cache_async(entry, &pvma, 0);
|
||||
page = swapin_readahead(entry, &pvma, 0);
|
||||
mpol_free(pvma.vm_policy);
|
||||
return page;
|
||||
}
|
||||
|
|
@ -1067,8 +1066,7 @@ static inline int shmem_parse_mpol(char *value, int *policy,
|
|||
static inline struct page *
|
||||
shmem_swapin(struct shmem_inode_info *info,swp_entry_t entry,unsigned long idx)
|
||||
{
|
||||
swapin_readahead(entry, 0, NULL);
|
||||
return read_swap_cache_async(entry, NULL, 0);
|
||||
return swapin_readahead(entry, NULL, 0);
|
||||
}
|
||||
|
||||
static inline struct page *
|
||||
|
|
|
|||
Loading…
Reference in a new issue