]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] migration: remove unnecessary PageSwapCache checks
authorChristoph Lameter <clameter@sgi.com>
Fri, 23 Jun 2006 09:03:08 +0000 (02:03 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Fri, 23 Jun 2006 14:42:46 +0000 (07:42 -0700)
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>
mm/shmem.c
mm/swapfile.c

index 10020d8b40736162fd7051b406a55b0dafaa28ac..84b5cf9b63c519b64b9682f9747152bc10407800 100644 (file)
@@ -1081,14 +1081,6 @@ repeat:
                        page_cache_release(swappage);
                        goto repeat;
                }
-               if (!PageSwapCache(swappage)) {
-                       /* Page migration has occured */
-                       shmem_swp_unmap(entry);
-                       spin_unlock(&info->lock);
-                       unlock_page(swappage);
-                       page_cache_release(swappage);
-                       goto repeat;
-               }
                if (PageWriteback(swappage)) {
                        shmem_swp_unmap(entry);
                        spin_unlock(&info->lock);
index e5fd5385f0cc119005a87decfb10385b67a2474f..47a6812f5f8cf5dcd6e0afc1894f9911e3ecfbd7 100644 (file)
@@ -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);
 
                /*