Discard fewer bits of the device number recd with smb. This does not depend on anything else. Andries diff -u --recursive --new-file -X /linux/dontdiff a/fs/smbfs/proc.c b/fs/smbfs/proc.c 25-akpm/fs/smbfs/proc.c | 10 +++++----- 25-akpm/fs/smbfs/proto.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff -puN fs/smbfs/proc.c~rdev-for-samba fs/smbfs/proc.c --- 25/fs/smbfs/proc.c~rdev-for-samba Mon Apr 14 16:37:00 2003 +++ 25-akpm/fs/smbfs/proc.c Mon Apr 14 16:37:00 2003 @@ -2085,7 +2085,6 @@ out: void smb_decode_unix_basic(struct smb_fattr *fattr, char *p) { /* FIXME: verify nls support. all is sent as utf8? */ - __u64 devmajor, devminor; fattr->f_unix = 1; fattr->f_mode = 0; @@ -2112,9 +2111,10 @@ void smb_decode_unix_basic(struct smb_fa fattr->f_mode |= smb_filetype_to_mode(WVAL(p, 56)); if (S_ISBLK(fattr->f_mode) || S_ISCHR(fattr->f_mode)) { - devmajor = LVAL(p, 60); - devminor = LVAL(p, 68); - fattr->f_rdev = ((devmajor & 0xFF) << 8) | (devminor & 0xFF); + __u64 major = LVAL(p, 60); + __u64 minor = LVAL(p, 68); + + fattr->f_rdev = MKDEV(major & 0xffffffff, minor & 0xffffffff); } fattr->f_mode |= LVAL(p, 84); } @@ -3008,7 +3008,7 @@ out: */ int smb_proc_setattr_unix(struct dentry *d, struct iattr *attr, - int major, int minor) + unsigned int major, unsigned int minor) { struct smb_sb_info *server = server_from_dentry(d); u64 nttime; diff -puN fs/smbfs/proto.h~rdev-for-samba fs/smbfs/proto.h --- 25/fs/smbfs/proto.h~rdev-for-samba Mon Apr 14 16:37:00 2003 +++ 25-akpm/fs/smbfs/proto.h Mon Apr 14 16:37:00 2003 @@ -27,7 +27,7 @@ extern void smb_init_root_dirent(struct extern void smb_decode_unix_basic(struct smb_fattr *fattr, char *p); extern int smb_proc_getattr(struct dentry *dir, struct smb_fattr *fattr); extern int smb_proc_setattr(struct dentry *dir, struct smb_fattr *fattr); -extern int smb_proc_setattr_unix(struct dentry *d, struct iattr *attr, int major, int minor); +extern int smb_proc_setattr_unix(struct dentry *d, struct iattr *attr, unsigned int major, unsigned int minor); extern int smb_proc_settime(struct dentry *dentry, struct smb_fattr *fattr); extern int smb_proc_dskattr(struct super_block *sb, struct statfs *attr); extern int smb_proc_read_link(struct smb_sb_info *server, struct dentry *d, char *buffer, int len); _