Commit b9f0f80c authored by Huang Shijie's avatar Huang Shijie Committed by james toy

Just simplify the code when `mlocked' is true.

Signed-off-by: default avatarHuang Shijie <shijie8@gmail.com>
Reviewed-by: default avatarKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent ad3a5ec5
...@@ -1103,13 +1103,10 @@ static int try_to_unmap_file(struct page *page, enum ttu_flags flags) ...@@ -1103,13 +1103,10 @@ static int try_to_unmap_file(struct page *page, enum ttu_flags flags)
if (ret == SWAP_MLOCK) { if (ret == SWAP_MLOCK) {
mlocked = try_to_mlock_page(page, vma); mlocked = try_to_mlock_page(page, vma);
if (mlocked) 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)) if (list_empty(&mapping->i_mmap_nonlinear))
goto out; goto out;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment