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
7ff47370
Commit
7ff47370
authored
Feb 06, 2004
by
Steve French
Committed by
Steve French
Feb 06, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reset searches properly when filldir fails
parent
aad2e949
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
8 deletions
+31
-8
fs/cifs/CHANGES
fs/cifs/CHANGES
+3
-2
fs/cifs/cifsglob.h
fs/cifs/cifsglob.h
+5
-1
fs/cifs/file.c
fs/cifs/file.c
+22
-4
fs/cifs/transport.c
fs/cifs/transport.c
+1
-1
No files found.
fs/cifs/CHANGES
View file @
7ff47370
Version 1.03
------------
Fix problem not attempting connect to server when port number
override not specified.
Connect to server when port number override not specified, and tcp port
unitialized. Reset search to restart at correct file when kernel routine
filldir returns error during large directory searches (readdir).
Version 1.02
------------
...
...
fs/cifs/cifsglob.h
View file @
7ff47370
...
...
@@ -16,6 +16,7 @@
*
*/
#include <linux/in.h>
#include <linux/in6.h>
#include "cifs_fs_sb.h"
/*
* The sizes of various internal tables and strings
...
...
@@ -105,7 +106,10 @@ struct TCP_Server_Info {
char
server_Name
[
SERVER_NAME_LEN_WITH_NULL
];
/* 15 chars + X'20'in 16th */
char
unicode_server_Name
[
SERVER_NAME_LEN_WITH_NULL
*
2
];
/* Unicode version of server_Name */
struct
socket
*
ssocket
;
struct
sockaddr_in
sockAddr
;
union
{
struct
sockaddr_in
sockAddr
;
struct
sockaddr_in6
sockAddr6
;
}
addr
;
wait_queue_head_t
response_q
;
struct
list_head
pending_mid_q
;
void
*
Server_NlsInfo
;
/* BB - placeholder for future NLS info */
...
...
fs/cifs/file.c
View file @
7ff47370
...
...
@@ -1283,8 +1283,8 @@ construct_dentry(struct qstr *qstring, struct file *file,
}
static
void
reset_resume_key
(
struct
file
*
dir_file
,
unsigned
char
*
filename
,
unsigned
int
len
)
{
unsigned
char
*
filename
,
unsigned
int
len
)
{
struct
cifsFileInfo
*
cifsFile
;
cifsFile
=
(
struct
cifsFileInfo
*
)
dir_file
->
private_data
;
...
...
@@ -1324,7 +1324,6 @@ cifs_filldir(struct qstr *pqstring, FILE_DIRECTORY_INFO * pfindData,
if
(
rc
)
{
/* due to readdir error we need to recalculate resume
key so next readdir will restart on right entry */
reset_resume_key
(
file
,
pfindData
->
FileName
,
pqstring
->
len
);
cFYI
(
1
,(
"Error %d on filldir of %s"
,
rc
,
pfindData
->
FileName
));
}
dput
(
tmp_dentry
);
...
...
@@ -1351,7 +1350,6 @@ cifs_filldir_unix(struct qstr *pqstring,
if
(
rc
)
{
/* due to readdir error we need to recalculate resume
key so next readdir will restart on right entry */
reset_resume_key
(
file
,
pUnixFindData
->
FileName
,
pqstring
->
len
);
cFYI
(
1
,(
"Error %d on filldir of %s"
,
rc
,
pUnixFindData
->
FileName
));
}
dput
(
tmp_dentry
);
...
...
@@ -1542,6 +1540,11 @@ cifs_readdir(struct file *file, void *direntry, filldir_t filldir)
/* do not end search if
kernel not ready to take
remaining entries yet */
if
(
Unicode
==
TRUE
)
{
qstring
.
len
=
cifs_strtoUCS
((
wchar_t
*
)
pfindData
->
FileName
,
pfindData
->
FileName
,
2
*
(
qstring
.
len
+
1
),
cifs_sb
->
local_nls
);
}
reset_resume_key
(
file
,
pfindData
->
FileName
,
qstring
.
len
);
findParms
.
EndofSearch
=
0
;
break
;
}
...
...
@@ -1580,6 +1583,11 @@ cifs_readdir(struct file *file, void *direntry, filldir_t filldir)
kernel not ready to take
remaining entries yet */
findParms
.
EndofSearch
=
0
;
if
(
Unicode
==
TRUE
)
{
qstring
.
len
=
cifs_strtoUCS
((
wchar_t
*
)
pfindDataUnix
->
FileName
,
pfindDataUnix
->
FileName
,
2
*
(
qstring
.
len
+
1
),
cifs_sb
->
local_nls
);
}
reset_resume_key
(
file
,
pfindDataUnix
->
FileName
,
qstring
.
len
);
break
;
}
file
->
f_pos
++
;
...
...
@@ -1729,6 +1737,11 @@ cifs_readdir(struct file *file, void *direntry, filldir_t filldir)
kernel not ready to take
remaining entries yet */
findNextParms
.
EndofSearch
=
0
;
if
(
Unicode
==
TRUE
)
{
qstring
.
len
=
cifs_strtoUCS
((
wchar_t
*
)
pfindData
->
FileName
,
pfindData
->
FileName
,
2
*
(
qstring
.
len
+
1
),
cifs_sb
->
local_nls
);
}
reset_resume_key
(
file
,
pfindData
->
FileName
,
qstring
.
len
);
break
;
}
file
->
f_pos
++
;
...
...
@@ -1769,6 +1782,11 @@ cifs_readdir(struct file *file, void *direntry, filldir_t filldir)
kernel not ready to take
remaining entries yet */
findNextParms
.
EndofSearch
=
0
;
if
(
Unicode
==
TRUE
)
{
qstring
.
len
=
cifs_strtoUCS
((
wchar_t
*
)
pfindDataUnix
->
FileName
,
pfindDataUnix
->
FileName
,
2
*
(
qstring
.
len
+
1
),
cifs_sb
->
local_nls
);
}
reset_resume_key
(
file
,
pfindDataUnix
->
FileName
,
qstring
.
len
);
break
;
}
file
->
f_pos
++
;
...
...
fs/cifs/transport.c
View file @
7ff47370
...
...
@@ -218,7 +218,7 @@ SendReceive(const unsigned int xid, struct cifsSesInfo *ses,
midQ
->
midState
=
MID_REQUEST_SUBMITTED
;
rc
=
smb_send
(
ses
->
server
->
ssocket
,
in_buf
,
in_buf
->
smb_buf_length
,
(
struct
sockaddr
*
)
&
(
ses
->
server
->
sockAddr
));
(
struct
sockaddr
*
)
&
(
ses
->
server
->
addr
.
sockAddr
));
up
(
&
ses
->
server
->
tcpSem
);
if
(
long_op
==
-
1
)
goto
cifs_no_response_exit
;
...
...
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