linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm: remove redundant check in handle_mm_fault
@ 2023-03-06  2:49 Haifeng Xu
  2023-03-06 13:49 ` David Hildenbrand
  0 siblings, 1 reply; 12+ messages in thread
From: Haifeng Xu @ 2023-03-06  2:49 UTC (permalink / raw)
  To: akpm; +Cc: linux-mm, linux-kernel, Haifeng Xu

mem_cgroup_oom_synchronize() has checked whether current memcg_in_oom is
set or not, so remove the check in handle_mm_fault().

Signed-off-by: Haifeng Xu <haifeng.xu@shopee.com>
---
 mm/memory.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/memory.c b/mm/memory.c
index f456f3b5049c..e066d974c27b 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -5206,7 +5206,7 @@ vm_fault_t handle_mm_fault(struct vm_area_struct *vma, unsigned long address,
 		 * VM_FAULT_OOM), there is no need to kill anything.
 		 * Just clean up the OOM state peacefully.
 		 */
-		if (task_in_memcg_oom(current) && !(ret & VM_FAULT_OOM))
+		if (!(ret & VM_FAULT_OOM))
 			mem_cgroup_oom_synchronize(false);
 	}
 
-- 
2.25.1



^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2023-03-14 12:40 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-06  2:49 [PATCH] mm: remove redundant check in handle_mm_fault Haifeng Xu
2023-03-06 13:49 ` David Hildenbrand
2023-03-07  2:36   ` Haifeng Xu
2023-03-07  2:48     ` Matthew Wilcox
2023-03-07  3:20       ` Haifeng Xu
2023-03-08  9:03       ` Haifeng Xu
2023-03-08  9:13         ` David Hildenbrand
2023-03-09  2:33           ` Haifeng Xu
2023-03-14  8:05           ` Haifeng Xu
2023-03-14  9:09             ` David Hildenbrand
2023-03-14 10:29               ` Haifeng Xu
2023-03-14 12:40                 ` Matthew Wilcox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox