Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
acf1a1b1
K
Kernel
项目概览
openeuler
/
Kernel
大约 1 年 前同步成功
通知
5
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
acf1a1b1
编写于
10月 12, 2006
作者:
S
Steve French
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[CIFS] Level 1 QPathInfo needed for proper OS2 support
Signed-off-by:
N
Steve French
<
sfrench@us.ibm.com
>
上级
ddae957d
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
23 addition
and
4 deletion
+23
-4
fs/cifs/cifsproto.h
fs/cifs/cifsproto.h
+1
-0
fs/cifs/cifssmb.c
fs/cifs/cifssmb.c
+18
-3
fs/cifs/inode.c
fs/cifs/inode.c
+4
-1
未找到文件。
fs/cifs/cifsproto.h
浏览文件 @
acf1a1b1
...
...
@@ -119,6 +119,7 @@ extern int CIFSFindClose(const int, struct cifsTconInfo *tcon,
extern
int
CIFSSMBQPathInfo
(
const
int
xid
,
struct
cifsTconInfo
*
tcon
,
const
unsigned
char
*
searchName
,
FILE_ALL_INFO
*
findData
,
int
legacy
/* whether to use old info level */
,
const
struct
nls_table
*
nls_codepage
,
int
remap
);
extern
int
SMBQueryInformation
(
const
int
xid
,
struct
cifsTconInfo
*
tcon
,
const
unsigned
char
*
searchName
,
...
...
fs/cifs/cifssmb.c
浏览文件 @
acf1a1b1
...
...
@@ -2969,6 +2969,7 @@ int
CIFSSMBQPathInfo
(
const
int
xid
,
struct
cifsTconInfo
*
tcon
,
const
unsigned
char
*
searchName
,
FILE_ALL_INFO
*
pFindData
,
int
legacy
/* old style infolevel */
,
const
struct
nls_table
*
nls_codepage
,
int
remap
)
{
/* level 263 SMB_QUERY_FILE_ALL_INFO */
...
...
@@ -3017,7 +3018,10 @@ CIFSSMBQPathInfo(const int xid, struct cifsTconInfo *tcon,
byte_count
=
params
+
1
/* pad */
;
pSMB
->
TotalParameterCount
=
cpu_to_le16
(
params
);
pSMB
->
ParameterCount
=
pSMB
->
TotalParameterCount
;
pSMB
->
InformationLevel
=
cpu_to_le16
(
SMB_QUERY_FILE_ALL_INFO
);
if
(
legacy
)
pSMB
->
InformationLevel
=
cpu_to_le16
(
SMB_INFO_STANDARD
);
else
pSMB
->
InformationLevel
=
cpu_to_le16
(
SMB_QUERY_FILE_ALL_INFO
);
pSMB
->
Reserved4
=
0
;
pSMB
->
hdr
.
smb_buf_length
+=
byte_count
;
pSMB
->
ByteCount
=
cpu_to_le16
(
byte_count
);
...
...
@@ -3029,13 +3033,24 @@ CIFSSMBQPathInfo(const int xid, struct cifsTconInfo *tcon,
}
else
{
/* decode response */
rc
=
validate_t2
((
struct
smb_t2_rsp
*
)
pSMBr
);
if
(
rc
||
(
pSMBr
->
ByteCount
<
40
))
if
(
rc
)
/* BB add auto retry on EOPNOTSUPP? */
rc
=
-
EIO
;
else
if
(
!
legacy
&&
(
pSMBr
->
ByteCount
<
40
))
rc
=
-
EIO
;
/* bad smb */
else
if
(
legacy
&&
(
pSMBr
->
ByteCount
<
24
))
rc
=
-
EIO
;
/* 24 or 26 expected but we do not read last field */
else
if
(
pFindData
){
int
size
;
__u16
data_offset
=
le16_to_cpu
(
pSMBr
->
t2
.
DataOffset
);
if
(
legacy
)
/* we do not read the last field, EAsize, fortunately
since it varies by subdialect and on Set vs. Get, is
two bytes or 4 bytes depending but we don't care here */
size
=
sizeof
(
FILE_INFO_STANDARD
);
else
size
=
sizeof
(
FILE_ALL_INFO
);
memcpy
((
char
*
)
pFindData
,
(
char
*
)
&
pSMBr
->
hdr
.
Protocol
+
data_offset
,
size
of
(
FILE_ALL_INFO
)
);
data_offset
,
size
);
}
else
rc
=
-
ENOMEM
;
}
...
...
fs/cifs/inode.c
浏览文件 @
acf1a1b1
...
...
@@ -338,6 +338,7 @@ int cifs_get_inode_info(struct inode **pinode,
pfindData
=
(
FILE_ALL_INFO
*
)
buf
;
/* could do find first instead but this returns more info */
rc
=
CIFSSMBQPathInfo
(
xid
,
pTcon
,
search_path
,
pfindData
,
0
/* not legacy */
,
cifs_sb
->
local_nls
,
cifs_sb
->
mnt_cifs_flags
&
CIFS_MOUNT_MAP_SPECIAL_CHR
);
/* BB optimize code so we do not make the above call
...
...
@@ -385,8 +386,10 @@ int cifs_get_inode_info(struct inode **pinode,
/* get new inode */
if
(
*
pinode
==
NULL
)
{
*
pinode
=
new_inode
(
sb
);
if
(
*
pinode
==
NULL
)
if
(
*
pinode
==
NULL
)
{
kfree
(
buf
);
return
-
ENOMEM
;
}
/* Is an i_ino of zero legal? Can we use that to check
if the server supports returning inode numbers? Are
there other sanity checks we can use to ensure that
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录