Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 lib/string.c |   23 -----------------------
 mm/slab.c    |   24 ++++++++++++++++++++++++
 2 files changed, 24 insertions(+), 23 deletions(-)

diff -puN lib/string.c~create-a-kstrdup-library-function-ppc-fix lib/string.c
--- 25/lib/string.c~create-a-kstrdup-library-function-ppc-fix	2005-06-06 00:14:16.000000000 -0700
+++ 25-akpm/lib/string.c	2005-06-06 00:14:16.000000000 -0700
@@ -23,7 +23,6 @@
 #include <linux/string.h>
 #include <linux/ctype.h>
 #include <linux/module.h>
-#include <linux/slab.h>
 
 #ifndef __HAVE_ARCH_STRNICMP
 /**
@@ -608,25 +607,3 @@ void *memchr(const void *s, int c, size_
 }
 EXPORT_SYMBOL(memchr);
 #endif
-
-/*
- * kstrdup - allocate space for and copy an existing string
- *
- * @s: the string to duplicate
- * @gfp: the GFP mask used in the kmalloc() call when allocating memory
- */
-char *kstrdup(const char *s, int gfp)
-{
-	size_t len;
-	char *buf;
-
-	if (!s)
-		return NULL;
-
-	len = strlen(s) + 1;
-	buf = kmalloc(len, gfp);
-	if (buf)
-		memcpy(buf, s, len);
-	return buf;
-}
-EXPORT_SYMBOL(kstrdup);
diff -puN mm/slab.c~create-a-kstrdup-library-function-ppc-fix mm/slab.c
--- 25/mm/slab.c~create-a-kstrdup-library-function-ppc-fix	2005-06-06 00:14:16.000000000 -0700
+++ 25-akpm/mm/slab.c	2005-06-06 00:14:16.000000000 -0700
@@ -92,6 +92,7 @@
 #include	<linux/sysctl.h>
 #include	<linux/module.h>
 #include	<linux/rcupdate.h>
+#include	<linux/string.h>
 
 #include	<asm/uaccess.h>
 #include	<asm/cacheflush.h>
@@ -3082,3 +3083,26 @@ unsigned int ksize(const void *objp)
 
 	return size;
 }
+
+
+/*
+ * kstrdup - allocate space for and copy an existing string
+ *
+ * @s: the string to duplicate
+ * @gfp: the GFP mask used in the kmalloc() call when allocating memory
+ */
+char *kstrdup(const char *s, int gfp)
+{
+	size_t len;
+	char *buf;
+
+	if (!s)
+		return NULL;
+
+	len = strlen(s) + 1;
+	buf = kmalloc(len, gfp);
+	if (buf)
+		memcpy(buf, s, len);
+	return buf;
+}
+EXPORT_SYMBOL(kstrdup);
_