Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3c5a87f4 authored by Christoph Lameter's avatar Christoph Lameter Committed by Linus Torvalds
Browse files

[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: default avatarChristoph Lameter <clameter@sgi.com>
Cc: Hugh Dickins <hugh@veritas.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 4776874f
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -1081,14 +1081,6 @@ static int shmem_getpage(struct inode *inode, unsigned long idx,
			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);
+0 −7
Original line number Diff line number Diff line
@@ -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 @@ static int try_to_unuse(unsigned int type)
		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);

		/*