[PATCH] hugetlb: offload per node attribute registrations fix

From: Lee Schermerhorn
Date: Mon Nov 02 2009 - 16:50:51 EST



Against: 2.6.32-rc5-mmotm-091101-1001

Fix build failure when MEMORY_HOTPLUG_SPARSE and !HUGETLBFS:

drivers/base/node.c:484: error: implicit declaration of function 'init_node_hugetlb_work'
drivers/base/node.c:582: error: 'node_memory_callback' undeclared (first use in this function)

Reported-by: Randy Dunlap <randy.dunlap@xxxxxxxxxx>
Signed-off-by: Lee Schermerhorn <lee.schermerhorn@xxxxxx>

drivers/base/node.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)

Index: linux-2.6.32-rc5-mmotm-091101-1001/drivers/base/node.c
===================================================================
--- linux-2.6.32-rc5-mmotm-091101-1001.orig/drivers/base/node.c 2009-11-02 15:51:43.000000000 -0500
+++ linux-2.6.32-rc5-mmotm-091101-1001/drivers/base/node.c 2009-11-02 16:41:36.000000000 -0500
@@ -445,8 +445,12 @@ static int node_memory_callback(struct n
}
#endif /* CONFIG_HUGETLBFS */
#else /* !CONFIG_MEMORY_HOTPLUG_SPARSE */
+
static int link_mem_sections(int nid) { return 0; }
+#endif /* CONFIG_MEMORY_HOTPLUG_SPARSE */

+#if !defined(CONFIG_MEMORY_HOTPLUG_SPARSE) || \
+ !defined(CONFIG_HUGETLBFS)
static inline int node_memory_callback(struct notifier_block *self,
unsigned long action, void *arg)
{
@@ -455,7 +459,7 @@ static inline int node_memory_callback(s

static void init_node_hugetlb_work(int nid) { }

-#endif /* CONFIG_MEMORY_HOTPLUG_SPARSE */
+#endif

int register_one_node(int nid)
{


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