]> Git Repo - linux.git/blobdiff - fs/proc/base.c
mm: remove the now-unnecessary mmget_still_valid() hack
[linux.git] / fs / proc / base.c
index 617db4e0faa09326cfa83969920b005ec9c042a9..aa69c35d904cae01dbbbf3004fac30470964c37c 100644 (file)
@@ -1055,7 +1055,6 @@ static ssize_t oom_adj_read(struct file *file, char __user *buf, size_t count,
 
 static int __set_oom_adj(struct file *file, int oom_adj, bool legacy)
 {
-       static DEFINE_MUTEX(oom_adj_mutex);
        struct mm_struct *mm = NULL;
        struct task_struct *task;
        int err = 0;
@@ -1095,7 +1094,7 @@ static int __set_oom_adj(struct file *file, int oom_adj, bool legacy)
                struct task_struct *p = find_lock_task_mm(task);
 
                if (p) {
-                       if (atomic_read(&p->mm->mm_users) > 1) {
+                       if (test_bit(MMF_MULTIPROCESS, &p->mm->flags)) {
                                mm = p->mm;
                                mmgrab(mm);
                        }
This page took 0.036697 seconds and 4 git commands to generate.