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
Kirill Smelkov
linux
Commits
0d7aad27
Commit
0d7aad27
authored
Aug 21, 2003
by
Steve French
Committed by
Steve French
Aug 21, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
retry socket write on EAGAIN. Fix oops in write when tcp session dead.
parent
3bae9dd8
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
4 deletions
+20
-4
fs/cifs/CHANGES
fs/cifs/CHANGES
+10
-0
fs/cifs/cifssmb.c
fs/cifs/cifssmb.c
+7
-0
fs/cifs/connect.c
fs/cifs/connect.c
+2
-2
fs/cifs/dir.c
fs/cifs/dir.c
+0
-1
fs/cifs/transport.c
fs/cifs/transport.c
+1
-1
No files found.
fs/cifs/CHANGES
View file @
0d7aad27
Version 0.89
------------
Fix oops on write to dead tcp session.
Version 0.88
------------
Fix non-POSIX behavior on rename of open file and delete of open file by taking
advantage of trans2 SetFileInfo rename facility if available on target server.
Retry on ENOSPC and EAGAIN socket errors.
Version 0.87
Version 0.87
------------
------------
Fix oops on big endian readdir. Set blksize to be even power of two (2**blkbits) to fix
Fix oops on big endian readdir. Set blksize to be even power of two (2**blkbits) to fix
...
...
fs/cifs/cifssmb.c
View file @
0d7aad27
...
@@ -526,6 +526,10 @@ CIFSSMBRead(const int xid, struct cifsTconInfo *tcon,
...
@@ -526,6 +526,10 @@ CIFSSMBRead(const int xid, struct cifsTconInfo *tcon,
if
(
rc
)
if
(
rc
)
return
rc
;
return
rc
;
/* tcon and ses pointer are checked in smb_init */
if
(
tcon
->
ses
->
server
==
NULL
)
return
-
ECONNABORTED
;
pSMB
->
AndXCommand
=
0xFF
;
/* none */
pSMB
->
AndXCommand
=
0xFF
;
/* none */
pSMB
->
Fid
=
netfid
;
pSMB
->
Fid
=
netfid
;
pSMB
->
OffsetLow
=
cpu_to_le32
(
lseek
&
0xFFFFFFFF
);
pSMB
->
OffsetLow
=
cpu_to_le32
(
lseek
&
0xFFFFFFFF
);
...
@@ -584,6 +588,9 @@ CIFSSMBWrite(const int xid, struct cifsTconInfo *tcon,
...
@@ -584,6 +588,9 @@ CIFSSMBWrite(const int xid, struct cifsTconInfo *tcon,
(
void
**
)
&
pSMBr
);
(
void
**
)
&
pSMBr
);
if
(
rc
)
if
(
rc
)
return
rc
;
return
rc
;
/* tcon and ses pointer are checked in smb_init */
if
(
tcon
->
ses
->
server
==
NULL
)
return
-
ECONNABORTED
;
pSMB
->
AndXCommand
=
0xFF
;
/* none */
pSMB
->
AndXCommand
=
0xFF
;
/* none */
pSMB
->
Fid
=
netfid
;
pSMB
->
Fid
=
netfid
;
...
...
fs/cifs/connect.c
View file @
0d7aad27
...
@@ -233,9 +233,9 @@ cifs_demultiplex_thread(struct TCP_Server_Info *server)
...
@@ -233,9 +233,9 @@ cifs_demultiplex_thread(struct TCP_Server_Info *server)
(
checkSMBhdr
(
checkSMBhdr
(
smb_buffer
,
smb_buffer
->
Mid
)))
{
(
smb_buffer
,
smb_buffer
->
Mid
)))
{
cERROR
(
1
,
cERROR
(
1
,
(
KERN_ERR
(
"Invalid size or format for SMB found with length %d and pdu_lenght %d"
,
"Invalid size or format for SMB found with length %d and pdu_lenght %d"
,
length
,
pdu_length
));
length
,
pdu_length
));
cifs_dump_mem
(
"Received Data is: "
,
temp
,
sizeof
(
struct
smb_hdr
));
/* BB fix by finding next smb signature - and reading off data until next smb ? BB */
/* BB fix by finding next smb signature - and reading off data until next smb ? BB */
/* BB add reconnect here */
/* BB add reconnect here */
...
...
fs/cifs/dir.c
View file @
0d7aad27
...
@@ -51,7 +51,6 @@ build_path_from_dentry(struct dentry *direntry)
...
@@ -51,7 +51,6 @@ build_path_from_dentry(struct dentry *direntry)
for
(
temp
=
direntry
;
!
IS_ROOT
(
temp
);)
{
for
(
temp
=
direntry
;
!
IS_ROOT
(
temp
);)
{
namelen
+=
(
1
+
temp
->
d_name
.
len
);
namelen
+=
(
1
+
temp
->
d_name
.
len
);
cFYI
(
1
,
(
" len %d "
,
namelen
));
temp
=
temp
->
d_parent
;
temp
=
temp
->
d_parent
;
}
}
namelen
+=
1
;
/* allow for trailing null */
namelen
+=
1
;
/* allow for trailing null */
...
...
fs/cifs/transport.c
View file @
0d7aad27
...
@@ -169,7 +169,7 @@ smb_send(struct socket *ssocket, struct smb_hdr *smb_buffer,
...
@@ -169,7 +169,7 @@ smb_send(struct socket *ssocket, struct smb_hdr *smb_buffer,
temp_fs
=
get_fs
();
/* we must turn off socket api parm checking */
temp_fs
=
get_fs
();
/* we must turn off socket api parm checking */
set_fs
(
get_ds
());
set_fs
(
get_ds
());
rc
=
sock_sendmsg
(
ssocket
,
&
smb_msg
,
smb_buf_length
+
4
);
rc
=
sock_sendmsg
(
ssocket
,
&
smb_msg
,
smb_buf_length
+
4
);
while
(
rc
==
-
ENOSPC
)
{
while
(
(
rc
==
-
ENOSPC
)
||
(
rc
==
-
EAGAIN
)
)
{
schedule_timeout
(
HZ
/
2
);
schedule_timeout
(
HZ
/
2
);
rc
=
sock_sendmsg
(
ssocket
,
&
smb_msg
,
smb_buf_length
+
4
);
rc
=
sock_sendmsg
(
ssocket
,
&
smb_msg
,
smb_buf_length
+
4
);
}
}
...
...
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