diff options
author | Huang Shijie <shijie8@gmail.com> | 2009-12-14 20:58:51 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-15 11:53:16 -0500 |
commit | 7b51159405272157123ea8e0ef9b63c731dbfb48 (patch) | |
tree | b483123483f3a3aba8b46db3150a76b5546f42c8 /mm/rmap.c | |
parent | 8051be5e614f3e3feccbe9e06b50e0b889740a93 (diff) |
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/rmap.c')
-rw-r--r-- | mm/rmap.c | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -1103,13 +1103,10 @@ static int try_to_unmap_file(struct page *page, enum ttu_flags flags) | |||
1103 | if (ret == SWAP_MLOCK) { | 1103 | if (ret == SWAP_MLOCK) { |
1104 | mlocked = try_to_mlock_page(page, vma); | 1104 | mlocked = try_to_mlock_page(page, vma); |
1105 | if (mlocked) | 1105 | if (mlocked) |
1106 | break; /* stop if actually mlocked page */ | 1106 | goto out; /* stop if actually mlocked page */ |
1107 | } | 1107 | } |
1108 | } | 1108 | } |
1109 | 1109 | ||
1110 | if (mlocked) | ||
1111 | goto out; | ||
1112 | |||
1113 | if (list_empty(&mapping->i_mmap_nonlinear)) | 1110 | if (list_empty(&mapping->i_mmap_nonlinear)) |
1114 | goto out; | 1111 | goto out; |
1115 | 1112 | ||