Messages in this thread Patch in this message | | | From | Andrea Arcangeli <> | Subject | [PATCH 01/35] mm: add unlikely to the mm allocation failure check | Date | Fri, 25 May 2012 19:02:05 +0200 |
| |
Very minor optimization to hint gcc.
Signed-off-by: Andrea Arcangeli <aarcange@redhat.com> --- 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));
| |