Skip to content

Commit fbe84a0

Browse files
Tetsuo Handatorvalds
authored andcommitted
mm,oom: remove unused argument from oom_scan_process_thread().
oom_scan_process_thread() does not use totalpages argument. oom_badness() uses it. Link: http://lkml.kernel.org/r/1463796041-7889-1-git-send-email-penguin-kernel@I-love.SAKURA.ne.jp Signed-off-by: Tetsuo Handa <[email protected]> Acked-by: Michal Hocko <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 3aa9799 commit fbe84a0

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

include/linux/oom.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ extern void check_panic_on_oom(struct oom_control *oc,
9292
enum oom_constraint constraint);
9393

9494
extern enum oom_scan_t oom_scan_process_thread(struct oom_control *oc,
95-
struct task_struct *task, unsigned long totalpages);
95+
struct task_struct *task);
9696

9797
extern bool out_of_memory(struct oom_control *oc);
9898

mm/memcontrol.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1290,7 +1290,7 @@ static bool mem_cgroup_out_of_memory(struct mem_cgroup *memcg, gfp_t gfp_mask,
12901290

12911291
css_task_iter_start(&iter->css, &it);
12921292
while ((task = css_task_iter_next(&it))) {
1293-
switch (oom_scan_process_thread(&oc, task, totalpages)) {
1293+
switch (oom_scan_process_thread(&oc, task)) {
12941294
case OOM_SCAN_SELECT:
12951295
if (chosen)
12961296
put_task_struct(chosen);

mm/oom_kill.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ static enum oom_constraint constrained_alloc(struct oom_control *oc,
274274
#endif
275275

276276
enum oom_scan_t oom_scan_process_thread(struct oom_control *oc,
277-
struct task_struct *task, unsigned long totalpages)
277+
struct task_struct *task)
278278
{
279279
if (oom_unkillable_task(task, NULL, oc->nodemask))
280280
return OOM_SCAN_CONTINUE;
@@ -311,7 +311,7 @@ static struct task_struct *select_bad_process(struct oom_control *oc,
311311
for_each_process(p) {
312312
unsigned int points;
313313

314-
switch (oom_scan_process_thread(oc, p, totalpages)) {
314+
switch (oom_scan_process_thread(oc, p)) {
315315
case OOM_SCAN_SELECT:
316316
chosen = p;
317317
chosen_points = ULONG_MAX;

0 commit comments

Comments
 (0)