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
7bf675d6
Commit
7bf675d6
authored
Feb 09, 2004
by
Steve French
Committed by
Steve French
Feb 09, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improve resume key resetting logic when filldir returns error and filename is in unicode
parent
47b65300
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
24 deletions
+20
-24
fs/cifs/file.c
fs/cifs/file.c
+20
-24
No files found.
fs/cifs/file.c
View file @
7bf675d6
...
...
@@ -1284,7 +1284,7 @@ construct_dentry(struct qstr *qstring, struct file *file,
static
void
reset_resume_key
(
struct
file
*
dir_file
,
unsigned
char
*
filename
,
unsigned
int
len
)
{
unsigned
int
len
,
int
Unicode
,
struct
nls_table
*
nls_tab
)
{
struct
cifsFileInfo
*
cifsFile
;
cifsFile
=
(
struct
cifsFileInfo
*
)
dir_file
->
private_data
;
...
...
@@ -1294,12 +1294,20 @@ static void reset_resume_key(struct file * dir_file,
kfree
(
cifsFile
->
search_resume_name
);
}
if
(
Unicode
)
len
*=
2
;
cifsFile
->
resume_name_length
=
len
;
cifsFile
->
search_resume_name
=
kmalloc
(
cifsFile
->
resume_name_length
,
GFP_KERNEL
);
memcpy
(
cifsFile
->
search_resume_name
,
filename
,
kmalloc
(
cifsFile
->
resume_name_length
,
GFP_KERNEL
);
if
(
Unicode
)
cifs_strtoUCS
((
wchar_t
*
)
cifsFile
->
search_resume_name
,
filename
,
len
,
nls_tab
);
else
memcpy
(
cifsFile
->
search_resume_name
,
filename
,
cifsFile
->
resume_name_length
);
cFYI
(
1
,(
"Reset resume key to: %s
"
,
filename
));
cFYI
(
1
,(
"Reset resume key to: %s
with len %d"
,
filename
,
len
));
return
;
}
...
...
@@ -1540,11 +1548,8 @@ 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
);
reset_resume_key
(
file
,
pfindData
->
FileName
,
qstring
.
len
,
Unicode
,
cifs_sb
->
local_nls
);
findParms
.
EndofSearch
=
0
;
break
;
}
...
...
@@ -1583,11 +1588,8 @@ 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
);
reset_resume_key
(
file
,
pfindDataUnix
->
FileName
,
qstring
.
len
,
Unicode
,
cifs_sb
->
local_nls
);
break
;
}
file
->
f_pos
++
;
...
...
@@ -1737,11 +1739,8 @@ 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
);
reset_resume_key
(
file
,
pfindData
->
FileName
,
qstring
.
len
,
Unicode
,
cifs_sb
->
local_nls
);
break
;
}
file
->
f_pos
++
;
...
...
@@ -1782,11 +1781,8 @@ 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
);
reset_resume_key
(
file
,
pfindDataUnix
->
FileName
,
qstring
.
len
,
Unicode
,
cifs_sb
->
local_nls
);
break
;
}
file
->
f_pos
++
;
...
...
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