Commit f0d10803 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] smbfs: larger dev_t preparation

Discard fewer bits of the device number recd with smb.
This does not depend on anything else.

Andries
parent cc43a08a
......@@ -2085,7 +2085,6 @@ smb_proc_readdir_short(struct file *filp, void *dirent, filldir_t filldir,
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_fattr *fattr, char *p)
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 @@ smb_proc_setattr_trans2(struct smb_sb_info *server,
*/
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;
......
......@@ -27,7 +27,7 @@ extern void smb_init_root_dirent(struct smb_sb_info *server, struct smb_fattr *f
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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment