linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] rmap : simplify the code for try_to_unmap_file
@ 2009-10-20  6:21 Huang Shijie
  2009-10-28 23:37 ` KOSAKI Motohiro
  0 siblings, 1 reply; 3+ messages in thread
From: Huang Shijie @ 2009-10-20  6:21 UTC (permalink / raw)
  To: akpm; +Cc: hugh.dickins, linux-mm, Huang Shijie

Just simplify the code when the mlocked is true.

Signed-off-by: Huang Shijie <shijie8@gmail.com>
---
 mm/rmap.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/mm/rmap.c b/mm/rmap.c
index dd43373..c57c3b6 100644
--- a/mm/rmap.c
+++ b/mm/rmap.c
@@ -1100,13 +1100,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;
 
-- 
1.6.0.6

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-10-29  1:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-20  6:21 [PATCH] rmap : simplify the code for try_to_unmap_file Huang Shijie
2009-10-28 23:37 ` KOSAKI Motohiro
2009-10-29  1:55   ` Huang Shijie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).