Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 288921
b: refs/heads/master
c: 9567000
h: refs/heads/master
i:
  288919: db8d757
v: v3
  • Loading branch information
Anton Vorontsov authored and Greg Kroah-Hartman committed Feb 9, 2012
1 parent e6bcf00 commit 51c007c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 294b27119f2e20643e71a0c1a1b511320a11e4c3
refs/heads/master: 95670001188911f9d466875cd68e3681f39df38a
16 changes: 9 additions & 7 deletions trunk/drivers/staging/android/lowmemorykiller.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ task_notify_func(struct notifier_block *self, unsigned long val, void *data)

static int lowmem_shrink(struct shrinker *s, struct shrink_control *sc)
{
struct task_struct *p;
struct task_struct *tsk;
struct task_struct *selected = NULL;
int rem = 0;
int tasksize;
Expand Down Expand Up @@ -134,15 +134,17 @@ static int lowmem_shrink(struct shrinker *s, struct shrink_control *sc)
selected_oom_adj = min_adj;

rcu_read_lock();
for_each_process(p) {
struct mm_struct *mm;
for_each_process(tsk) {
struct task_struct *p;
struct signal_struct *sig;
int oom_adj;

task_lock(p);
mm = p->mm;
p = find_lock_task_mm(tsk);
if (!p)
continue;

sig = p->signal;
if (!mm || !sig) {
if (!sig) {
task_unlock(p);
continue;
}
Expand All @@ -151,7 +153,7 @@ static int lowmem_shrink(struct shrinker *s, struct shrink_control *sc)
task_unlock(p);
continue;
}
tasksize = get_mm_rss(mm);
tasksize = get_mm_rss(p->mm);
task_unlock(p);
if (tasksize <= 0)
continue;
Expand Down

0 comments on commit 51c007c

Please sign in to comment.