Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
d82c2df5
Commit
d82c2df5
authored
Nov 15, 2008
by
Steve French
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[CIFS] minor cleanup to cifs_mount
Signed-off-by:
Steve French
<
sfrench@us.ibm.com
>
parent
14fbf50d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
40 deletions
+34
-40
fs/cifs/connect.c
fs/cifs/connect.c
+34
-40
No files found.
fs/cifs/connect.c
View file @
d82c2df5
...
@@ -1368,7 +1368,6 @@ cifs_find_tcp_session(struct sockaddr *addr)
...
@@ -1368,7 +1368,6 @@ cifs_find_tcp_session(struct sockaddr *addr)
list_for_each
(
tmp
,
&
cifs_tcp_ses_list
)
{
list_for_each
(
tmp
,
&
cifs_tcp_ses_list
)
{
server
=
list_entry
(
tmp
,
struct
TCP_Server_Info
,
server
=
list_entry
(
tmp
,
struct
TCP_Server_Info
,
tcp_ses_list
);
tcp_ses_list
);
/*
/*
* the demux thread can exit on its own while still in CifsNew
* the demux thread can exit on its own while still in CifsNew
* so don't accept any sockets in that state. Since the
* so don't accept any sockets in that state. Since the
...
@@ -1389,6 +1388,7 @@ cifs_find_tcp_session(struct sockaddr *addr)
...
@@ -1389,6 +1388,7 @@ cifs_find_tcp_session(struct sockaddr *addr)
++
server
->
srv_count
;
++
server
->
srv_count
;
write_unlock
(
&
cifs_tcp_ses_lock
);
write_unlock
(
&
cifs_tcp_ses_lock
);
cFYI
(
1
,
(
"Existing tcp session with server found"
));
return
server
;
return
server
;
}
}
write_unlock
(
&
cifs_tcp_ses_lock
);
write_unlock
(
&
cifs_tcp_ses_lock
);
...
@@ -2076,9 +2076,7 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
...
@@ -2076,9 +2076,7 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
}
}
srvTcp
=
cifs_find_tcp_session
(
&
addr
);
srvTcp
=
cifs_find_tcp_session
(
&
addr
);
if
(
srvTcp
)
{
if
(
!
srvTcp
)
{
/* create socket */
cFYI
(
1
,
(
"Existing tcp session with server found"
));
}
else
{
/* create socket */
if
(
addr
.
sa_family
==
AF_INET6
)
{
if
(
addr
.
sa_family
==
AF_INET6
)
{
cFYI
(
1
,
(
"attempting ipv6 connect"
));
cFYI
(
1
,
(
"attempting ipv6 connect"
));
/* BB should we allow ipv6 on port 139? */
/* BB should we allow ipv6 on port 139? */
...
@@ -2292,45 +2290,41 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
...
@@ -2292,45 +2290,41 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
cifs_put_smb_ses
(
pSesInfo
);
cifs_put_smb_ses
(
pSesInfo
);
else
else
cifs_put_tcp_session
(
srvTcp
);
cifs_put_tcp_session
(
srvTcp
);
}
else
{
goto
out
;
atomic_inc
(
&
tcon
->
useCount
);
}
cifs_sb
->
tcon
=
tcon
;
atomic_inc
(
&
tcon
->
useCount
);
tcon
->
ses
=
pSesInfo
;
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
));
if
((
tcon
->
unix_ext
==
0
)
&&
(
cifs_sb
->
rsize
>
(
1024
*
127
)))
{
/* do not care if following two calls succeed - informational */
cifs_sb
->
rsize
=
1024
*
127
;
if
(
!
tcon
->
ipc
)
{
cFYI
(
DBG2
,
CIFSSMBQFSDeviceInfo
(
xid
,
tcon
);
(
"no very large read support, rsize now 127K"
));
CIFSSMBQFSAttributeInfo
(
xid
,
tcon
);
}
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
));
}
}
/* 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
/* volume_info.password is freed above when existing session found
(in which case it is not needed anymore) but when new sesion is created
(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
the password ptr is put in the new session structure (in which case the
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment