Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
d82c2df5
cloud-kernel
项目概览
openanolis
/
cloud-kernel
大约 1 年 前同步成功
通知
158
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
d82c2df5
编写于
11月 15, 2008
作者:
S
Steve French
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[CIFS] minor cleanup to cifs_mount
Signed-off-by:
N
Steve French
<
sfrench@us.ibm.com
>
上级
14fbf50d
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
34 addition
and
40 deletion
+34
-40
fs/cifs/connect.c
fs/cifs/connect.c
+34
-40
未找到文件。
fs/cifs/connect.c
浏览文件 @
d82c2df5
...
...
@@ -1368,7 +1368,6 @@ cifs_find_tcp_session(struct sockaddr *addr)
list_for_each
(
tmp
,
&
cifs_tcp_ses_list
)
{
server
=
list_entry
(
tmp
,
struct
TCP_Server_Info
,
tcp_ses_list
);
/*
* the demux thread can exit on its own while still in CifsNew
* so don't accept any sockets in that state. Since the
...
...
@@ -1389,6 +1388,7 @@ cifs_find_tcp_session(struct sockaddr *addr)
++
server
->
srv_count
;
write_unlock
(
&
cifs_tcp_ses_lock
);
cFYI
(
1
,
(
"Existing tcp session with server found"
));
return
server
;
}
write_unlock
(
&
cifs_tcp_ses_lock
);
...
...
@@ -2076,9 +2076,7 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
}
srvTcp
=
cifs_find_tcp_session
(
&
addr
);
if
(
srvTcp
)
{
cFYI
(
1
,
(
"Existing tcp session with server found"
));
}
else
{
/* create socket */
if
(
!
srvTcp
)
{
/* create socket */
if
(
addr
.
sa_family
==
AF_INET6
)
{
cFYI
(
1
,
(
"attempting ipv6 connect"
));
/* BB should we allow ipv6 on port 139? */
...
...
@@ -2292,45 +2290,41 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
cifs_put_smb_ses
(
pSesInfo
);
else
cifs_put_tcp_session
(
srvTcp
);
}
else
{
atomic_inc
(
&
tcon
->
useCount
);
cifs_sb
->
tcon
=
tcon
;
tcon
->
ses
=
pSesInfo
;
/* do not care if following two calls succeed - informational */
if
(
!
tcon
->
ipc
)
{
CIFSSMBQFSDeviceInfo
(
xid
,
tcon
);
CIFSSMBQFSAttributeInfo
(
xid
,
tcon
);
}
/* tell server which Unix caps we support */
if
(
tcon
->
ses
->
capabilities
&
CAP_UNIX
)
/* reset of caps checks mount to see if unix extensions
disabled for just this mount */
reset_cifs_unix_caps
(
xid
,
tcon
,
sb
,
&
volume_info
);
else
tcon
->
unix_ext
=
0
;
/* server does not support them */
/* convert forward to back slashes in prepath here if needed */
if
((
cifs_sb
->
mnt_cifs_flags
&
CIFS_MOUNT_POSIX_PATHS
)
==
0
)
convert_delimiter
(
cifs_sb
->
prepath
,
CIFS_DIR_SEP
(
cifs_sb
));
goto
out
;
}
atomic_inc
(
&
tcon
->
useCount
);
cifs_sb
->
tcon
=
tcon
;
tcon
->
ses
=
pSesInfo
;
if
((
tcon
->
unix_ext
==
0
)
&&
(
cifs_sb
->
rsize
>
(
1024
*
127
)))
{
cifs_sb
->
rsize
=
1024
*
127
;
cFYI
(
DBG2
,
(
"no very large read support, rsize now 127K"
));
}
if
(
!
(
tcon
->
ses
->
capabilities
&
CAP_LARGE_WRITE_X
))
cifs_sb
->
wsize
=
min
(
cifs_sb
->
wsize
,
(
tcon
->
ses
->
server
->
maxBuf
-
MAX_CIFS_HDR_SIZE
));
if
(
!
(
tcon
->
ses
->
capabilities
&
CAP_LARGE_READ_X
))
cifs_sb
->
rsize
=
min
(
cifs_sb
->
rsize
,
(
tcon
->
ses
->
server
->
maxBuf
-
MAX_CIFS_HDR_SIZE
));
/* do not care if following two calls succeed - informational */
if
(
!
tcon
->
ipc
)
{
CIFSSMBQFSDeviceInfo
(
xid
,
tcon
);
CIFSSMBQFSAttributeInfo
(
xid
,
tcon
);
}
/* tell server which Unix caps we support */
if
(
tcon
->
ses
->
capabilities
&
CAP_UNIX
)
/* reset of caps checks mount to see if unix extensions
disabled for just this mount */
reset_cifs_unix_caps
(
xid
,
tcon
,
sb
,
&
volume_info
);
else
tcon
->
unix_ext
=
0
;
/* server does not support them */
/* convert forward to back slashes in prepath here if needed */
if
((
cifs_sb
->
mnt_cifs_flags
&
CIFS_MOUNT_POSIX_PATHS
)
==
0
)
convert_delimiter
(
cifs_sb
->
prepath
,
CIFS_DIR_SEP
(
cifs_sb
));
if
((
tcon
->
unix_ext
==
0
)
&&
(
cifs_sb
->
rsize
>
(
1024
*
127
)))
{
cifs_sb
->
rsize
=
1024
*
127
;
cFYI
(
DBG2
,
(
"no very large read support, rsize now 127K"
));
}
if
(
!
(
tcon
->
ses
->
capabilities
&
CAP_LARGE_WRITE_X
))
cifs_sb
->
wsize
=
min
(
cifs_sb
->
wsize
,
(
tcon
->
ses
->
server
->
maxBuf
-
MAX_CIFS_HDR_SIZE
));
if
(
!
(
tcon
->
ses
->
capabilities
&
CAP_LARGE_READ_X
))
cifs_sb
->
rsize
=
min
(
cifs_sb
->
rsize
,
(
tcon
->
ses
->
server
->
maxBuf
-
MAX_CIFS_HDR_SIZE
));
/* volume_info.password is freed above when existing session found
(in which case it is not needed anymore) but when new sesion is created
the password ptr is put in the new session structure (in which case the
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录