From: Urban Widmark <urban@teststation.com>

On Sun, 28 Sep 2003, Oliver Pitzeier wrote:

> Hi folks/Linus!
> 
<snip>
> It work's on my Intel machine, but on Alpha, I get this:
> <snip>
<snip, snip>
> fs/built-in.o: In function `smb_fill_super':
> fs/built-in.o(.text+0xc9618): undefined reference to `low2highuid'
> fs/built-in.o(.text+0xc9624): undefined reference to `low2highuid'
> fs/built-in.o(.text+0xc963c): undefined reference to `low2highuid'
> fs/built-in.o(.text+0xc9640): undefined reference to `low2highuid'
> make: *** [.tmp_vmlinux1] Error 1

This patch should solve this.

Linus, please apply unless you dislike OLD_TO_NEW_GID.
smbfs is the only user of it and could check CONFIG_UID16 itself.



 fs/smbfs/inode.c        |    4 ++--
 include/linux/highuid.h |    4 ++++
 2 files changed, 6 insertions(+), 2 deletions(-)

diff -puN fs/smbfs/inode.c~smbfs-build-fix fs/smbfs/inode.c
--- 25/fs/smbfs/inode.c~smbfs-build-fix	2003-09-28 14:42:05.000000000 -0700
+++ 25-akpm/fs/smbfs/inode.c	2003-09-28 14:42:05.000000000 -0700
@@ -551,8 +551,8 @@ int smb_fill_super(struct super_block *s
 	if (ver == SMB_MOUNT_OLDVERSION) {
 		mnt->version = oldmnt->version;
 
-		mnt->uid = low2highuid(oldmnt->uid);
-		mnt->gid = low2highuid(oldmnt->gid);
+		mnt->uid = OLD_TO_NEW_UID(oldmnt->uid);
+		mnt->gid = OLD_TO_NEW_GID(oldmnt->gid);
 
 		mnt->file_mode = (oldmnt->file_mode & S_IRWXUGO) | S_IFREG;
 		mnt->dir_mode = (oldmnt->dir_mode & S_IRWXUGO) | S_IFDIR;
diff -puN include/linux/highuid.h~smbfs-build-fix include/linux/highuid.h
--- 25/include/linux/highuid.h~smbfs-build-fix	2003-09-28 14:42:05.000000000 -0700
+++ 25-akpm/include/linux/highuid.h	2003-09-28 14:42:05.000000000 -0700
@@ -56,6 +56,8 @@ extern int overflowgid;
 #define SET_GID16(var, gid)	var = high2lowgid(gid)
 #define NEW_TO_OLD_UID(uid)	high2lowuid(uid)
 #define NEW_TO_OLD_GID(gid)	high2lowgid(gid)
+#define OLD_TO_NEW_UID(uid)	low2highuid(uid)
+#define OLD_TO_NEW_GID(gid)	low2highgid(gid)
 
 /* specific to fs/stat.c */
 #define SET_OLDSTAT_UID(stat, uid)	(stat).st_uid = high2lowuid(uid)
@@ -69,6 +71,8 @@ extern int overflowgid;
 #define SET_GID16(var, gid)	do { ; } while (0)
 #define NEW_TO_OLD_UID(uid)	(uid)
 #define NEW_TO_OLD_GID(gid)	(gid)
+#define OLD_TO_NEW_UID(uid)	(uid)
+#define OLD_TO_NEW_GID(gid)	(gid)
 
 #define SET_OLDSTAT_UID(stat, uid)	(stat).st_uid = (uid)
 #define SET_OLDSTAT_GID(stat, gid)	(stat).st_gid = (gid)

_