Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753245Ab2F1NBm (ORCPT ); Thu, 28 Jun 2012 09:01:42 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57678 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755877Ab2F1M6k (ORCPT ); Thu, 28 Jun 2012 08:58:40 -0400 From: Andrea Arcangeli To: linux-kernel@vger.kernel.org, linux-mm@kvack.org Cc: Hillf Danton , Dan Smith , Peter Zijlstra , Linus Torvalds , Andrew Morton , Thomas Gleixner , Ingo Molnar , Paul Turner , Suresh Siddha , Mike Galbraith , "Paul E. McKenney" , Lai Jiangshan , Bharata B Rao , Lee Schermerhorn , Rik van Riel , Johannes Weiner , Srivatsa Vaddagiri , Christoph Lameter , Alex Shi , Mauricio Faria de Oliveira , Konrad Rzeszutek Wilk , Don Morris , Benjamin Herrenschmidt Subject: [PATCH 01/40] mm: add unlikely to the mm allocation failure check Date: Thu, 28 Jun 2012 14:55:41 +0200 Message-Id: <1340888180-15355-2-git-send-email-aarcange@redhat.com> In-Reply-To: <1340888180-15355-1-git-send-email-aarcange@redhat.com> References: <1340888180-15355-1-git-send-email-aarcange@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 711 Lines: 25 Very minor optimization to hint gcc. Signed-off-by: Andrea Arcangeli --- kernel/fork.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/kernel/fork.c b/kernel/fork.c index ab5211b..5fcfa70 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -572,7 +572,7 @@ struct mm_struct *mm_alloc(void) struct mm_struct *mm; mm = allocate_mm(); - if (!mm) + if (unlikely(!mm)) return NULL; memset(mm, 0, sizeof(*mm)); -- 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/