Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964918Ab2EYRGx (ORCPT ); Fri, 25 May 2012 13:06:53 -0400 Received: from mx1.redhat.com ([209.132.183.28]:9097 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933697Ab2EYRDp (ORCPT ); Fri, 25 May 2012 13:03:45 -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 Subject: [PATCH 01/35] mm: add unlikely to the mm allocation failure check Date: Fri, 25 May 2012 19:02:05 +0200 Message-Id: <1337965359-29725-2-git-send-email-aarcange@redhat.com> In-Reply-To: <1337965359-29725-1-git-send-email-aarcange@redhat.com> References: <1337965359-29725-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 47b4e4f..98db8b0 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -571,7 +571,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/