Unverified Commit 43632871 authored by Pekka Enberg's avatar Pekka Enberg Committed by Palmer Dabbelt
Browse files

riscv/mm: Simplify retry logic in do_page_fault()



Let's combine the two retry logic if statements in do_page_fault() to
simplify the code.

Signed-off-by: default avatarPekka Enberg <penberg@kernel.org>
Signed-off-by: default avatarPalmer Dabbelt <palmerdabbelt@google.com>
parent d012a719
Loading
Loading
Loading
Loading
+9 −11
Original line number Diff line number Diff line
@@ -127,8 +127,7 @@ good_area:
		BUG();
	}

	if (flags & FAULT_FLAG_ALLOW_RETRY) {
		if (fault & VM_FAULT_RETRY) {
	if (unlikely((fault & VM_FAULT_RETRY) && (flags & FAULT_FLAG_ALLOW_RETRY))) {
		flags |= FAULT_FLAG_TRIED;

		/*
@@ -138,7 +137,6 @@ good_area:
		 */
		goto retry;
	}
	}

	mmap_read_unlock(mm);
	return;