Merge tag 'mtd/fixes-for-6.1-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git...
[platform/kernel/linux-starfive.git] / mm / oom_kill.c
index 3996301..1276e49 100644 (file)
@@ -461,7 +461,7 @@ static void dump_header(struct oom_control *oc, struct task_struct *p)
        if (is_memcg_oom(oc))
                mem_cgroup_print_oom_meminfo(oc->memcg);
        else {
-               show_mem(SHOW_MEM_FILTER_NODES, oc->nodemask);
+               __show_mem(SHOW_MEM_FILTER_NODES, oc->nodemask, gfp_zone(oc->gfp_mask));
                if (should_dump_unreclaim_slab())
                        dump_unreclaimable_slab();
        }
@@ -509,7 +509,7 @@ static DECLARE_WAIT_QUEUE_HEAD(oom_reaper_wait);
 static struct task_struct *oom_reaper_list;
 static DEFINE_SPINLOCK(oom_reaper_lock);
 
-bool __oom_reap_task_mm(struct mm_struct *mm)
+static bool __oom_reap_task_mm(struct mm_struct *mm)
 {
        struct vm_area_struct *vma;
        bool ret = true;
@@ -765,10 +765,8 @@ static void mark_oom_victim(struct task_struct *tsk)
                return;
 
        /* oom_mm is bound to the signal struct life time. */
-       if (!cmpxchg(&tsk->signal->oom_mm, NULL, mm)) {
+       if (!cmpxchg(&tsk->signal->oom_mm, NULL, mm))
                mmgrab(tsk->signal->oom_mm);
-               set_bit(MMF_OOM_VICTIM, &mm->flags);
-       }
 
        /*
         * Make sure that the task is woken up from uninterruptible sleep