From 7b51159405272157123ea8e0ef9b63c731dbfb48 Mon Sep 17 00:00:00 2001 From: Huang Shijie Date: Mon, 14 Dec 2009 17:58:51 -0800 Subject: [PATCH] rmap: simplify try_to_unmap_file() Just simplify the code when `mlocked' is true. Signed-off-by: Huang Shijie Reviewed-by: KOSAKI Motohiro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- mm/rmap.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/mm/rmap.c b/mm/rmap.c index 265d5299..e032d96 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; -- 2.7.4