Commit 8c592f24 authored by Steve French's avatar Steve French

Set DevMajor/DevMinor when querying info on remote char/block devices

Signed-off-by: Steve French (sfrench@us.ibm.com)
parent c1c67b31
...@@ -4,7 +4,8 @@ Make transaction counts more consistent. Merge /proc/fs/cifs/SimultaneousOps ...@@ -4,7 +4,8 @@ Make transaction counts more consistent. Merge /proc/fs/cifs/SimultaneousOps
info into /proc/fs/cifs/DebugData. Fix oops in rare oops in readdir info into /proc/fs/cifs/DebugData. Fix oops in rare oops in readdir
(in build_wildcard_path_from_dentry). Fix mknod to pass type field (in build_wildcard_path_from_dentry). Fix mknod to pass type field
(block/char/fifo) properly. Remove spurious mount warning log entry when (block/char/fifo) properly. Remove spurious mount warning log entry when
credentials passed as mount argument. credentials passed as mount argument. Set major/minor device number in
inode for block and char devices when unix extensions enabled.
Version 1.19 Version 1.19
------------ ------------
......
...@@ -1463,9 +1463,13 @@ unix_fill_in_inode(struct inode *tmp_inode, ...@@ -1463,9 +1463,13 @@ unix_fill_in_inode(struct inode *tmp_inode,
} else if (pfindData->Type == UNIX_CHARDEV) { } else if (pfindData->Type == UNIX_CHARDEV) {
*pobject_type = DT_CHR; *pobject_type = DT_CHR;
tmp_inode->i_mode |= S_IFCHR; tmp_inode->i_mode |= S_IFCHR;
tmp_inode->i_rdev = MKDEV(le64_to_cpu(pfindData->DevMajor),
le64_to_cpu(pfindData->DevMinor) & MINORMASK);
} else if (pfindData->Type == UNIX_BLOCKDEV) { } else if (pfindData->Type == UNIX_BLOCKDEV) {
*pobject_type = DT_BLK; *pobject_type = DT_BLK;
tmp_inode->i_mode |= S_IFBLK; tmp_inode->i_mode |= S_IFBLK;
tmp_inode->i_rdev = MKDEV(le64_to_cpu(pfindData->DevMajor),
le64_to_cpu(pfindData->DevMinor) & MINORMASK);
} else if (pfindData->Type == UNIX_FIFO) { } else if (pfindData->Type == UNIX_FIFO) {
*pobject_type = DT_FIFO; *pobject_type = DT_FIFO;
tmp_inode->i_mode |= S_IFIFO; tmp_inode->i_mode |= S_IFIFO;
......
...@@ -110,8 +110,12 @@ cifs_get_inode_info_unix(struct inode **pinode, ...@@ -110,8 +110,12 @@ cifs_get_inode_info_unix(struct inode **pinode,
inode->i_mode |= S_IFDIR; inode->i_mode |= S_IFDIR;
} else if (findData.Type == UNIX_CHARDEV) { } else if (findData.Type == UNIX_CHARDEV) {
inode->i_mode |= S_IFCHR; inode->i_mode |= S_IFCHR;
inode->i_rdev = MKDEV(le64_to_cpu(findData.DevMajor),
le64_to_cpu(findData.DevMinor) & MINORMASK);
} else if (findData.Type == UNIX_BLOCKDEV) { } else if (findData.Type == UNIX_BLOCKDEV) {
inode->i_mode |= S_IFBLK; inode->i_mode |= S_IFBLK;
inode->i_rdev = MKDEV(le64_to_cpu(findData.DevMajor),
le64_to_cpu(findData.DevMinor) & MINORMASK);
} else if (findData.Type == UNIX_FIFO) { } else if (findData.Type == UNIX_FIFO) {
inode->i_mode |= S_IFIFO; inode->i_mode |= S_IFIFO;
} else if (findData.Type == UNIX_SOCKET) { } else if (findData.Type == UNIX_SOCKET) {
......
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