staging/android: fix build issues
authorCorentin Chary <corentincj@iksaif.net>
Sat, 28 Nov 2009 08:45:14 +0000 (09:45 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 30 Nov 2011 11:26:09 +0000 (20:26 +0900)
Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/android/logger.c
drivers/staging/android/lowmemorykiller.c

index 6c10b456c6cc5c082c6ceca278672c98538ff0aa..64cc2a1e7b163cda23f801a838d2d49f514f6bab 100644 (file)
@@ -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>
index 935d281a201acdfcff732d1e74d1879942c9e183..32314e85e2b7615cbe3770260523dc4adbed6ed6 100644 (file)
@@ -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;