[PATCH 19/39] mm: add unlikely to the mm allocation failure check

From: Andrea Arcangeli
Date: Mon Mar 26 2012 - 14:12:21 EST


Very minor optimization to hint gcc.

Signed-off-by: Andrea Arcangeli <aarcange@xxxxxxxxxx>
---
kernel/fork.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/fork.c b/kernel/fork.c
index aefe24f..31b2f35 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -547,7 +547,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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/