Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7b511594 authored by Huang Shijie's avatar Huang Shijie Committed by Linus Torvalds
Browse files

rmap: simplify try_to_unmap_file()



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>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 8051be5e
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -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;