提交 23687af9 编写于 作者: C Corentin Chary 提交者: Greg Kroah-Hartman

staging/android: fix build issues

Signed-off-by: NCorentin Chary <corentincj@iksaif.net>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 355b0502
......@@ -17,6 +17,7 @@
* GNU General Public License for more details.
*/
#include <linux/sched.h>
#include <linux/module.h>
#include <linux/fs.h>
#include <linux/miscdevice.h>
......
......@@ -100,15 +100,17 @@ static int lowmem_shrink(int nr_to_scan, gfp_t gfp_mask)
read_lock(&tasklist_lock);
for_each_process(p) {
struct mm_struct *mm;
struct signal_struct *sig;
int oom_adj;
task_lock(p);
mm = p->mm;
if (!mm) {
sig = p->signal;
if (!mm || !sig) {
task_unlock(p);
continue;
}
oom_adj = mm->oom_adj;
oom_adj = sig->oom_adj;
if (oom_adj < min_adj) {
task_unlock(p);
continue;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册