Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755386Ab2BFQ37 (ORCPT ); Mon, 6 Feb 2012 11:29:59 -0500 Received: from mail-bk0-f46.google.com ([209.85.214.46]:57593 "EHLO mail-bk0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754513Ab2BFQ35 (ORCPT ); Mon, 6 Feb 2012 11:29:57 -0500 Date: Mon, 6 Feb 2012 20:29:54 +0400 From: Anton Vorontsov To: Oleg Nesterov , Greg KH Cc: Arve =?utf-8?B?SGrDuG5uZXbDpWc=?= , KOSAKI Motohiro , San Mehat , Colin Cross , "Eric W. Biederman" , "Paul E. McKenney" , linux-kernel@vger.kernel.org, kernel-team@android.com, linaro-kernel@lists.linaro.org Subject: [PATCH 5/6] staging: android/lowmemorykiller: No need for task->signal check Message-ID: <20120206162954.GE5117@oksana.dev.rtsoft.ru> References: <20120203163056.GA4190@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20120203163056.GA4190@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1238 Lines: 41 task->signal == NULL is not possible, so no need for these checks. Suggested-by: Oleg Nesterov Signed-off-by: Anton Vorontsov --- 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/