Commit b83699ea authored by Huacai Chen's avatar Huacai Chen
Browse files

LoongArch: mm: Avoid unnecessary page fault retires on shared memory types



Commit d9272525 ("mm: avoid unnecessary page fault retires on
shared memory types") modifies do_page_fault() to handle the VM_FAULT_
COMPLETED case, but forget to change for LoongArch, so fix it as other
architectures does.

Fixes: d9272525 ("mm: avoid unnecessary page fault retires on shared memory types")
Reviewed-by: default avatarGuo Ren <guoren@kernel.org>
Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
parent 720dc7ab
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -216,6 +216,10 @@ static void __kprobes __do_page_fault(struct pt_regs *regs,
		return;
	}

	/* The fault is fully completed (including releasing mmap lock) */
	if (fault & VM_FAULT_COMPLETED)
		return;

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