mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
[PATCH] migration: remove unnecessary PageSwapCache checks
Remove two unnecessary PageSwapCache checks. The page refcount is raised and therefore page migration cannot occur in both functions. Signed-off-by: Christoph Lameter <[email protected]> Cc: Hugh Dickins <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
4776874ff0
commit
3c5a87f476
2 changed files with 0 additions and 15 deletions
|
|
@ -716,7 +716,6 @@ static int try_to_unuse(unsigned int type)
|
|||
*/
|
||||
swap_map = &si->swap_map[i];
|
||||
entry = swp_entry(type, i);
|
||||
again:
|
||||
page = read_swap_cache_async(entry, NULL, 0);
|
||||
if (!page) {
|
||||
/*
|
||||
|
|
@ -751,12 +750,6 @@ again:
|
|||
wait_on_page_locked(page);
|
||||
wait_on_page_writeback(page);
|
||||
lock_page(page);
|
||||
if (!PageSwapCache(page)) {
|
||||
/* Page migration has occured */
|
||||
unlock_page(page);
|
||||
page_cache_release(page);
|
||||
goto again;
|
||||
}
|
||||
wait_on_page_writeback(page);
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in a new issue