sys_mknod() was changed to take an unisgned int for the dev_t, for
compatibility with existing userspace.

This will break ppc64, which has a 64-bit dev_t already.   Fix that up.



 arch/ppc64/kernel/misc.S     |    4 ++--
 arch/ppc64/kernel/syscalls.c |   10 ++++++++++
 fs/namei.c                   |    2 +-
 include/linux/namei.h        |    1 +
 4 files changed, 14 insertions(+), 3 deletions(-)

diff -puN arch/ppc64/kernel/misc.S~ppc64-64-bit-mknod-fix arch/ppc64/kernel/misc.S
--- 25/arch/ppc64/kernel/misc.S~ppc64-64-bit-mknod-fix	2003-08-03 23:50:12.000000000 -0700
+++ 25-akpm/arch/ppc64/kernel/misc.S	2003-08-04 00:03:21.000000000 -0700
@@ -612,7 +612,7 @@ _GLOBAL(sys_call_table32)
 	.llong .sys32_execve
 	.llong .sys_chdir
 	.llong .sys32_time
-	.llong .sys_mknod
+	.llong .ppc64_mknod
 	.llong .sys_chmod		/* 15 */
 	.llong .sys_lchown
 	.llong .sys_ni_syscall		/* old break syscall */
@@ -855,7 +855,7 @@ _GLOBAL(sys_call_table)
 	.llong .sys_execve
 	.llong .sys_chdir
 	.llong .sys64_time
-	.llong .sys_mknod
+	.llong .ppc64_mknod
 	.llong .sys_chmod		/* 15 */
 	.llong .sys_lchown
 	.llong .sys_ni_syscall		/* old break syscall */
diff -puN arch/ppc64/kernel/syscalls.c~ppc64-64-bit-mknod-fix arch/ppc64/kernel/syscalls.c
--- 25/arch/ppc64/kernel/syscalls.c~ppc64-64-bit-mknod-fix	2003-08-03 23:51:20.000000000 -0700
+++ 25-akpm/arch/ppc64/kernel/syscalls.c	2003-08-04 00:03:21.000000000 -0700
@@ -36,6 +36,7 @@
 #include <linux/file.h>
 #include <linux/init.h>
 #include <linux/personality.h>
+#include <linux/namei.h>
 
 #include <asm/uaccess.h>
 #include <asm/ipc.h>
@@ -227,3 +228,12 @@ asmlinkage time_t sys64_time(time_t* tlo
 
 	return secs;
 }
+
+/*
+ * ppc64 dev_t's are "long", whereas sys_mknod now takes an unsigned int
+ */
+asmlinkage long
+ppc64_mknod(const char __user *filename, int mode, dev_t dev)
+{
+	return do_mknod(filename, mode, dev);
+}
diff -puN fs/namei.c~ppc64-64-bit-mknod-fix fs/namei.c
--- 25/fs/namei.c~ppc64-64-bit-mknod-fix	2003-08-03 23:53:21.000000000 -0700
+++ 25-akpm/fs/namei.c	2003-08-03 23:54:28.000000000 -0700
@@ -1424,7 +1424,7 @@ int vfs_mknod(struct inode *dir, struct 
 	return error;
 }
 
-static long
+long
 do_mknod(const char __user *filename, int mode, dev_t dev)
 {
 	int error = 0;
diff -puN include/linux/namei.h~ppc64-64-bit-mknod-fix include/linux/namei.h
--- 25/include/linux/namei.h~ppc64-64-bit-mknod-fix	2003-08-03 23:53:49.000000000 -0700
+++ 25-akpm/include/linux/namei.h	2003-08-03 23:54:06.000000000 -0700
@@ -66,5 +66,6 @@ extern int follow_up(struct vfsmount **,
 
 extern struct dentry *lock_rename(struct dentry *, struct dentry *);
 extern void unlock_rename(struct dentry *, struct dentry *);
+extern long do_mknod(const char __user *filename, int mode, dev_t dev);
 
 #endif /* _LINUX_NAMEI_H */

_