summaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorHuang Shijie <shijie8@gmail.com>2009-12-15 02:58:51 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2009-12-15 17:53:16 +0100
commit7b51159405272157123ea8e0ef9b63c731dbfb48 (patch)
treeb483123483f3a3aba8b46db3150a76b5546f42c8 /mm
parentrmap: fix the comment for try_to_unmap_anon (diff)
downloadlinux-7b51159405272157123ea8e0ef9b63c731dbfb48.tar.xz
linux-7b51159405272157123ea8e0ef9b63c731dbfb48.zip
rmap: simplify try_to_unmap_file()
Just simplify the code when `mlocked' is true. Signed-off-by: Huang Shijie <shijie8@gmail.com> Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/rmap.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/mm/rmap.c b/mm/rmap.c
index 265d529905a7..e032d96fd64e 100644
--- a/mm/rmap.c
+++ b/mm/rmap.c
@@ -1103,13 +1103,10 @@ static int try_to_unmap_file(struct page *page, enum ttu_flags flags)
if (ret == SWAP_MLOCK) {
mlocked = try_to_mlock_page(page, vma);
if (mlocked)
- break; /* stop if actually mlocked page */
+ goto out; /* stop if actually mlocked page */
}
}
- if (mlocked)
- goto out;
-
if (list_empty(&mapping->i_mmap_nonlinear))
goto out;