[patch 06/10] Add return value to reserve_bootmem_node()

From: Greg KH
Date: Mon Jun 23 2008 - 19:08:57 EST


2.6.25.9-stable review patch. If anyone has any objections, please let
us know.

------------------
From: Bernhard Walle <bwalle@xxxxxxx>

commit 71c2742f5e6348d76ee62085cf0a13e5eff0f00e upstream

This patch changes the function reserve_bootmem_node() from void to int,
returning -ENOMEM if the allocation fails.

This fixes a build problem on x86 with CONFIG_KEXEC=y and
CONFIG_NEED_MULTIPLE_NODES=y

Signed-off-by: Bernhard Walle <bwalle@xxxxxxx>
Reported-by: Adrian Bunk <bunk@xxxxxxxxxx>
Signed-off-by: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>

---
include/linux/bootmem.h | 2 +-
mm/bootmem.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)

--- a/include/linux/bootmem.h
+++ b/include/linux/bootmem.h
@@ -94,7 +94,7 @@ extern unsigned long init_bootmem_node(p
unsigned long freepfn,
unsigned long startpfn,
unsigned long endpfn);
-extern void reserve_bootmem_node(pg_data_t *pgdat,
+extern int reserve_bootmem_node(pg_data_t *pgdat,
unsigned long physaddr,
unsigned long size,
int flags);
--- a/mm/bootmem.c
+++ b/mm/bootmem.c
@@ -398,10 +398,10 @@ unsigned long __init init_bootmem_node(p
return init_bootmem_core(pgdat, freepfn, startpfn, endpfn);
}

-void __init reserve_bootmem_node(pg_data_t *pgdat, unsigned long physaddr,
+int __init reserve_bootmem_node(pg_data_t *pgdat, unsigned long physaddr,
unsigned long size, int flags)
{
- reserve_bootmem_core(pgdat->bdata, physaddr, size, flags);
+ return reserve_bootmem_core(pgdat->bdata, physaddr, size, flags);
}

void __init free_bootmem_node(pg_data_t *pgdat, unsigned long physaddr,

--
--
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/