summaryrefslogtreecommitdiffstats
path: root/mm/swapfile.c
diff options
context:
space:
mode:
authorChristoph Lameter <clameter@sgi.com>2006-06-23 02:03:08 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-23 07:42:46 -0700
commit3c5a87f476bed45616e7e543dcaea4440c77bf93 (patch)
tree0ff4c86ef594f7bfad9937095b69aab5e70b4174 /mm/swapfile.c
parent4776874ff096cd410382c0eca5d75f69c9dfa58f (diff)
downloadop-kernel-dev-3c5a87f476bed45616e7e543dcaea4440c77bf93.zip
op-kernel-dev-3c5a87f476bed45616e7e543dcaea4440c77bf93.tar.gz
[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 <clameter@sgi.com> Cc: Hugh Dickins <hugh@veritas.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'mm/swapfile.c')
-rw-r--r--mm/swapfile.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/mm/swapfile.c b/mm/swapfile.c
index e5fd538..47a6812 100644
--- a/mm/swapfile.c
+++ b/mm/swapfile.c
@@ -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);
/*
OpenPOWER on IntegriCloud