Skip to content

Commit

Permalink
rmap: simplify try_to_unmap_file()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Huang Shijie authored and Linus Torvalds committed Dec 15, 2009
1 parent 8051be5 commit 7b51159
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions mm/rmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 7b51159

Please sign in to comment.