diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/exec.c | 4 | ||||
-rw-r--r-- | fs/proc/base.c | 13 |
2 files changed, 0 insertions, 17 deletions
@@ -841,10 +841,6 @@ static int exec_mmap(struct mm_struct *mm) | |||
841 | tsk->mm = mm; | 841 | tsk->mm = mm; |
842 | tsk->active_mm = mm; | 842 | tsk->active_mm = mm; |
843 | activate_mm(active_mm, mm); | 843 | activate_mm(active_mm, mm); |
844 | if (old_mm && tsk->signal->oom_score_adj == OOM_SCORE_ADJ_MIN) { | ||
845 | atomic_dec(&old_mm->oom_disable_count); | ||
846 | atomic_inc(&tsk->mm->oom_disable_count); | ||
847 | } | ||
848 | task_unlock(tsk); | 844 | task_unlock(tsk); |
849 | arch_pick_mmap_layout(mm); | 845 | arch_pick_mmap_layout(mm); |
850 | if (old_mm) { | 846 | if (old_mm) { |
diff --git a/fs/proc/base.c b/fs/proc/base.c index 5eb02069e1b8..8f0087e20e16 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c | |||
@@ -1107,13 +1107,6 @@ static ssize_t oom_adjust_write(struct file *file, const char __user *buf, | |||
1107 | goto err_sighand; | 1107 | goto err_sighand; |
1108 | } | 1108 | } |
1109 | 1109 | ||
1110 | if (oom_adjust != task->signal->oom_adj) { | ||
1111 | if (oom_adjust == OOM_DISABLE) | ||
1112 | atomic_inc(&task->mm->oom_disable_count); | ||
1113 | if (task->signal->oom_adj == OOM_DISABLE) | ||
1114 | atomic_dec(&task->mm->oom_disable_count); | ||
1115 | } | ||
1116 | |||
1117 | /* | 1110 | /* |
1118 | * Warn that /proc/pid/oom_adj is deprecated, see | 1111 | * Warn that /proc/pid/oom_adj is deprecated, see |
1119 | * Documentation/feature-removal-schedule.txt. | 1112 | * Documentation/feature-removal-schedule.txt. |
@@ -1215,12 +1208,6 @@ static ssize_t oom_score_adj_write(struct file *file, const char __user *buf, | |||
1215 | goto err_sighand; | 1208 | goto err_sighand; |
1216 | } | 1209 | } |
1217 | 1210 | ||
1218 | if (oom_score_adj != task->signal->oom_score_adj) { | ||
1219 | if (oom_score_adj == OOM_SCORE_ADJ_MIN) | ||
1220 | atomic_inc(&task->mm->oom_disable_count); | ||
1221 | if (task->signal->oom_score_adj == OOM_SCORE_ADJ_MIN) | ||
1222 | atomic_dec(&task->mm->oom_disable_count); | ||
1223 | } | ||
1224 | task->signal->oom_score_adj = oom_score_adj; | 1211 | task->signal->oom_score_adj = oom_score_adj; |
1225 | if (has_capability_noaudit(current, CAP_SYS_RESOURCE)) | 1212 | if (has_capability_noaudit(current, CAP_SYS_RESOURCE)) |
1226 | task->signal->oom_score_adj_min = oom_score_adj; | 1213 | task->signal->oom_score_adj_min = oom_score_adj; |