提交 7b511594 编写于 作者: H Huang Shijie 提交者: Linus Torvalds

rmap: simplify try_to_unmap_file()

Just simplify the code when `mlocked' is true.
Signed-off-by: NHuang Shijie <shijie8@gmail.com>
Reviewed-by: NKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 8051be5e
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册