Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xiphi1978
linux
提交
f19159dc
L
linux
项目概览
xiphi1978
/
linux
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
f19159dc
编写于
4月 21, 2010
作者:
S
Steve French
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[CIFS] Cleanup various minor breakage in previous cFYI cleanup
Signed-off-by:
N
Steve French
<
sfrench@us.ibm.com
>
上级
b6b38f70
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
29 addition
and
29 deletion
+29
-29
fs/cifs/cifsfs.h
fs/cifs/cifsfs.h
+1
-1
fs/cifs/cifssmb.c
fs/cifs/cifssmb.c
+11
-11
fs/cifs/file.c
fs/cifs/file.c
+6
-6
fs/cifs/inode.c
fs/cifs/inode.c
+11
-11
未找到文件。
fs/cifs/cifsfs.h
浏览文件 @
f19159dc
...
...
@@ -114,5 +114,5 @@ extern long cifs_ioctl(struct file *filep, unsigned int cmd, unsigned long arg);
extern
const
struct
export_operations
cifs_export_ops
;
#endif
/* EXPERIMENTAL */
#define CIFS_VERSION "1.6
2
"
#define CIFS_VERSION "1.6
3
"
#endif
/* _CIFSFS_H */
fs/cifs/cifssmb.c
浏览文件 @
f19159dc
/*
* fs/cifs/cifssmb.c
*
* Copyright (C) International Business Machines Corp., 2002,20
09
* Copyright (C) International Business Machines Corp., 2002,20
10
* Author(s): Steve French (sfrench@us.ibm.com)
*
* Contains the routines for constructing the SMB PDUs themselves
...
...
@@ -493,14 +493,14 @@ CIFSSMBNegotiate(unsigned int xid, struct cifsSesInfo *ses)
goto
neg_err_exit
;
}
cFYI
(
1
,
(
"LANMAN negotiated"
)
);
cFYI
(
1
,
"LANMAN negotiated"
);
/* we will not end up setting signing flags - as no signing
was in LANMAN and server did not return the flags on */
goto
signing_check
;
#else
/* weak security disabled */
}
else
if
(
pSMBr
->
hdr
.
WordCount
==
13
)
{
cERROR
(
1
,
(
"mount failed, cifs module not built "
"with CIFS_WEAK_PW_HASH support"
)
)
;
cERROR
(
1
,
"mount failed, cifs module not built "
"with CIFS_WEAK_PW_HASH support"
);
rc
=
-
EOPNOTSUPP
;
#endif
/* WEAK_PW_HASH */
goto
neg_err_exit
;
...
...
@@ -1513,7 +1513,7 @@ CIFSSMBWrite(const int xid, struct cifsTconInfo *tcon,
(
struct
smb_hdr
*
)
pSMBr
,
&
bytes_returned
,
long_op
);
cifs_stats_inc
(
&
tcon
->
num_writes
);
if
(
rc
)
{
cFYI
(
1
,
(
"Send error in write = %d"
,
rc
)
);
cFYI
(
1
,
"Send error in write = %d"
,
rc
);
}
else
{
*
nbytes
=
le16_to_cpu
(
pSMBr
->
CountHigh
);
*
nbytes
=
(
*
nbytes
)
<<
16
;
...
...
@@ -2529,7 +2529,7 @@ validate_ntransact(char *buf, char **ppparm, char **ppdata,
cFYI
(
1
,
"data starts after end of smb"
);
return
-
EINVAL
;
}
else
if
(
data_count
+
*
ppdata
>
end_of_smb
)
{
cFYI
(
1
,
"data %p + count %d (%p)
ends after end of smb
%p start %p"
,
cFYI
(
1
,
"data %p + count %d (%p)
past smb end
%p start %p"
,
*
ppdata
,
data_count
,
(
data_count
+
*
ppdata
),
end_of_smb
,
pSMBr
);
return
-
EINVAL
;
...
...
@@ -3304,7 +3304,7 @@ CIFSSMBQFileInfo(const int xid, struct cifsTconInfo *tcon,
rc
=
SendReceive
(
xid
,
tcon
->
ses
,
(
struct
smb_hdr
*
)
pSMB
,
(
struct
smb_hdr
*
)
pSMBr
,
&
bytes_returned
,
0
);
if
(
rc
)
{
cFYI
(
1
,
(
"Send error in QPathInfo = %d"
,
rc
)
);
cFYI
(
1
,
"Send error in QPathInfo = %d"
,
rc
);
}
else
{
/* decode response */
rc
=
validate_t2
((
struct
smb_t2_rsp
*
)
pSMBr
);
...
...
@@ -3472,14 +3472,14 @@ CIFSSMBUnixQFileInfo(const int xid, struct cifsTconInfo *tcon,
rc
=
SendReceive
(
xid
,
tcon
->
ses
,
(
struct
smb_hdr
*
)
pSMB
,
(
struct
smb_hdr
*
)
pSMBr
,
&
bytes_returned
,
0
);
if
(
rc
)
{
cFYI
(
1
,
(
"Send error in QPathInfo = %d"
,
rc
)
);
cFYI
(
1
,
"Send error in QPathInfo = %d"
,
rc
);
}
else
{
/* decode response */
rc
=
validate_t2
((
struct
smb_t2_rsp
*
)
pSMBr
);
if
(
rc
||
(
pSMBr
->
ByteCount
<
sizeof
(
FILE_UNIX_BASIC_INFO
)))
{
cERROR
(
1
,
(
"Malformed FILE_UNIX_BASIC_INFO response.
\n
"
cERROR
(
1
,
"Malformed FILE_UNIX_BASIC_INFO response.
\n
"
"Unix Extensions can be disabled on mount "
"by specifying the nosfu mount option."
)
)
;
"by specifying the nosfu mount option."
);
rc
=
-
EIO
;
/* bad smb */
}
else
{
__u16
data_offset
=
le16_to_cpu
(
pSMBr
->
t2
.
DataOffset
);
...
...
@@ -4037,7 +4037,7 @@ parse_DFS_referrals(TRANSACTION2_GET_DFS_REFER_RSP *pSMBr,
data_end
=
(
char
*
)(
&
(
pSMBr
->
PathConsumed
))
+
le16_to_cpu
(
pSMBr
->
t2
.
DataCount
);
cFYI
(
1
,
"num_referrals: %d dfs flags: 0x%x ...
\n
"
,
cFYI
(
1
,
"num_referrals: %d dfs flags: 0x%x ...
\n
"
,
*
num_of_nodes
,
le32_to_cpu
(
pSMBr
->
DFSFlags
));
...
...
fs/cifs/file.c
浏览文件 @
f19159dc
...
...
@@ -3,7 +3,7 @@
*
* vfs operations that deal with files
*
* Copyright (C) International Business Machines Corp., 2002,20
07
* Copyright (C) International Business Machines Corp., 2002,20
10
* Author(s): Steve French (sfrench@us.ibm.com)
* Jeremy Allison (jra@samba.org)
*
...
...
@@ -855,9 +855,9 @@ int cifs_lock(struct file *file, int cmd, struct file_lock *pfLock)
0
/* wait flag */
);
pfLock
->
fl_type
=
F_RDLCK
;
if
(
rc
!=
0
)
cERROR
(
1
,
(
"Error unlocking "
cERROR
(
1
,
"Error unlocking "
"previously locked range %d "
"during test of lock"
,
rc
)
)
;
"during test of lock"
,
rc
);
rc
=
0
;
}
else
{
pfLock
->
fl_type
=
F_WRLCK
;
...
...
@@ -1709,7 +1709,7 @@ int cifs_fsync(struct file *file, struct dentry *dentry, int datasync)
unsigned int rpages = 0;
int rc = 0;
cFYI(1, "sync page %p",page);
cFYI(1, "sync page %p",
page);
mapping = page->mapping;
if (!mapping)
return 0;
...
...
@@ -1998,7 +1998,7 @@ static int cifs_readpages(struct file *file, struct address_space *mapping,
cifs_sb
=
CIFS_SB
(
file
->
f_path
.
dentry
->
d_sb
);
pTcon
=
cifs_sb
->
tcon
;
cFYI
(
DBG2
,
(
"rpages: num pages %d"
,
num_pages
)
);
cFYI
(
DBG2
,
"rpages: num pages %d"
,
num_pages
);
for
(
i
=
0
;
i
<
num_pages
;
)
{
unsigned
contig_pages
;
struct
page
*
tmp_page
;
...
...
fs/cifs/inode.c
浏览文件 @
f19159dc
/*
* fs/cifs/inode.c
*
* Copyright (C) International Business Machines Corp., 2002,20
08
* Copyright (C) International Business Machines Corp., 2002,20
10
* Author(s): Steve French (sfrench@us.ibm.com)
*
* This library is free software; you can redistribute it and/or modify
...
...
@@ -86,30 +86,30 @@ cifs_revalidate_cache(struct inode *inode, struct cifs_fattr *fattr)
{
struct
cifsInodeInfo
*
cifs_i
=
CIFS_I
(
inode
);
cFYI
(
1
,
(
"%s: revalidating inode %llu"
,
__func__
,
cifs_i
->
uniqueid
)
);
cFYI
(
1
,
"%s: revalidating inode %llu"
,
__func__
,
cifs_i
->
uniqueid
);
if
(
inode
->
i_state
&
I_NEW
)
{
cFYI
(
1
,
(
"%s: inode %llu is new"
,
__func__
,
cifs_i
->
uniqueid
)
);
cFYI
(
1
,
"%s: inode %llu is new"
,
__func__
,
cifs_i
->
uniqueid
);
return
;
}
/* don't bother with revalidation if we have an oplock */
if
(
cifs_i
->
clientCanCacheRead
)
{
cFYI
(
1
,
(
"%s: inode %llu is oplocked"
,
__func__
,
cifs_i
->
uniqueid
)
)
;
cFYI
(
1
,
"%s: inode %llu is oplocked"
,
__func__
,
cifs_i
->
uniqueid
);
return
;
}
/* revalidate if mtime or size have changed */
if
(
timespec_equal
(
&
inode
->
i_mtime
,
&
fattr
->
cf_mtime
)
&&
cifs_i
->
server_eof
==
fattr
->
cf_eof
)
{
cFYI
(
1
,
(
"%s: inode %llu is unchanged"
,
__func__
,
cifs_i
->
uniqueid
)
)
;
cFYI
(
1
,
"%s: inode %llu is unchanged"
,
__func__
,
cifs_i
->
uniqueid
);
return
;
}
cFYI
(
1
,
(
"%s: invalidating inode %llu mapping"
,
__func__
,
cifs_i
->
uniqueid
)
)
;
cFYI
(
1
,
"%s: invalidating inode %llu mapping"
,
__func__
,
cifs_i
->
uniqueid
);
cifs_i
->
invalid_mapping
=
true
;
}
...
...
@@ -1577,9 +1577,9 @@ int cifs_revalidate_dentry(struct dentry *dentry)
goto
check_inval
;
}
cFYI
(
1
,
(
"Revalidate: %s inode 0x%p count %d dentry: 0x%p d_time %ld "
cFYI
(
1
,
"Revalidate: %s inode 0x%p count %d dentry: 0x%p d_time %ld "
"jiffies %ld"
,
full_path
,
inode
,
inode
->
i_count
.
counter
,
dentry
,
dentry
->
d_time
,
jiffies
)
)
;
dentry
,
dentry
->
d_time
,
jiffies
);
if
(
CIFS_SB
(
sb
)
->
tcon
->
unix_ext
)
rc
=
cifs_get_inode_info_unix
(
&
inode
,
full_path
,
sb
,
xid
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录