[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120206162954.GE5117@oksana.dev.rtsoft.ru>
Date: Mon, 6 Feb 2012 20:29:54 +0400
From: Anton Vorontsov <anton.vorontsov@...aro.org>
To: Oleg Nesterov <oleg@...hat.com>,
Greg KH <gregkh@...uxfoundation.org>
Cc: Arve Hjønnevåg <arve@...roid.com>,
KOSAKI Motohiro <kosaki.motohiro@...il.com>,
San Mehat <san@...gle.com>, Colin Cross <ccross@...roid.com>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
linux-kernel@...r.kernel.org, kernel-team@...roid.com,
linaro-kernel@...ts.linaro.org
Subject: [PATCH 5/6] staging: android/lowmemorykiller: No need for
task->signal check
task->signal == NULL is not possible, so no need for these checks.
Suggested-by: Oleg Nesterov <oleg@...hat.com>
Signed-off-by: Anton Vorontsov <anton.vorontsov@...aro.org>
---
drivers/staging/android/lowmemorykiller.c | 8 +-------
1 files changed, 1 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/android/lowmemorykiller.c b/drivers/staging/android/lowmemorykiller.c
index 0755e2f..6e800d3 100644
--- a/drivers/staging/android/lowmemorykiller.c
+++ b/drivers/staging/android/lowmemorykiller.c
@@ -136,19 +136,13 @@ static int lowmem_shrink(struct shrinker *s, struct shrink_control *sc)
rcu_read_lock();
for_each_process(tsk) {
struct task_struct *p;
- struct signal_struct *sig;
int oom_adj;
p = find_lock_task_mm(tsk);
if (!p)
continue;
- sig = p->signal;
- if (!sig) {
- task_unlock(p);
- continue;
- }
- oom_adj = sig->oom_adj;
+ oom_adj = p->signal->oom_adj;
if (oom_adj < min_adj) {
task_unlock(p);
continue;
--
1.7.7.6
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists