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
c0fb8b10
Commit
c0fb8b10
authored
Jun 18, 2004
by
Steve French
Committed by
Steve French
Jun 18, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
check better for free files on writepage retry
Signed-off-by: Steve French (sfrench@us.ibm.com)
parent
610bc17d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
7 deletions
+21
-7
fs/cifs/file.c
fs/cifs/file.c
+21
-7
No files found.
fs/cifs/file.c
View file @
c0fb8b10
...
...
@@ -588,9 +588,10 @@ cifs_write(struct file * file, const char *write_data,
if
(
file
->
f_dentry
==
NULL
)
return
-
EBADF
;
xid
=
GetXid
();
cifs_sb
=
CIFS_SB
(
file
->
f_dentry
->
d_sb
);
if
(
cifs_sb
==
NULL
)
{
return
-
EBADF
;
}
pTcon
=
cifs_sb
->
tcon
;
/*cFYI(1,
...
...
@@ -598,11 +599,12 @@ cifs_write(struct file * file, const char *write_data,
*poffset, file->f_dentry->d_name.name)); */
if
(
file
->
private_data
==
NULL
)
{
FreeXid
(
xid
);
return
-
EBADF
;
}
else
{
open_file
=
(
struct
cifsFileInfo
*
)
file
->
private_data
;
}
open_file
=
(
struct
cifsFileInfo
*
)
file
->
private_data
;
xid
=
GetXid
();
if
(
file
->
f_dentry
->
d_inode
==
NULL
)
{
FreeXid
(
xid
);
return
-
EBADF
;
...
...
@@ -620,10 +622,22 @@ cifs_write(struct file * file, const char *write_data,
if
(
file
->
private_data
==
NULL
)
{
/* file has been closed on us */
FreeXid
(
xid
);
/* if we have gotten here we have written some data
and blocked, and the file has been freed on us
while we blocked so return what we managed to write */
return
total_written
;
}
open_file
=
(
struct
cifsFileInfo
*
)
file
->
private_data
;
if
(
open_file
->
closePend
)
{
FreeXid
(
xid
);
if
(
total_written
)
return
total_written
;
else
return
-
EBADF
;
}
if
((
open_file
->
invalidHandle
)
&&
(
!
open_file
->
closePend
))
{
if
((
file
->
f_dentry
==
NULL
)
||
(
file
->
f_dentry
->
d_inode
==
NULL
))
{
if
(
open_file
->
invalidHandle
)
{
if
((
file
->
f_dentry
==
NULL
)
||
(
file
->
f_dentry
->
d_inode
==
NULL
))
{
FreeXid
(
xid
);
return
total_written
;
}
...
...
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