Skip to content

Commit b83699e

Browse files
committed
LoongArch: mm: Avoid unnecessary page fault retires on shared memory types
Commit d927252 ("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: d927252 ("mm: avoid unnecessary page fault retires on shared memory types") Reviewed-by: Guo Ren <[email protected]> Signed-off-by: Huacai Chen <[email protected]>
1 parent 720dc7a commit b83699e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

arch/loongarch/mm/fault.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,10 @@ static void __kprobes __do_page_fault(struct pt_regs *regs,
216216
return;
217217
}
218218

219+
/* The fault is fully completed (including releasing mmap lock) */
220+
if (fault & VM_FAULT_COMPLETED)
221+
return;
222+
219223
if (unlikely(fault & VM_FAULT_RETRY)) {
220224
flags |= FAULT_FLAG_TRIED;
221225

0 commit comments

Comments
 (0)