simple_lmk: Print a message when there are no processes to kill

Makes it clear that Simple LMK tried its best but there was nothing it
could do.

Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
fourteen
Sultan Alsawaf 5 years ago committed by Jenna
parent 2a11b49e85
commit e66f1253c5
  1. 4
      drivers/android/simple_lmk.c

@ -165,8 +165,10 @@ static void scan_and_kill(unsigned long pages_needed)
read_unlock(&tasklist_lock);
/* Pretty unlikely but it can happen */
if (unlikely(!nr_victims))
if (unlikely(!nr_victims)) {
pr_err("No processes available to kill!\n");
return;
}
/* First round of victim processing to weed out unneeded victims */
nr_to_kill = process_victims(nr_victims, pages_needed);

Loading…
Cancel
Save