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
9ce5a232
Commit
9ce5a232
authored
Apr 08, 2015
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ocfs2_file_write_iter: keep return value and current position update in sync
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
cf1b5ea1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
fs/ocfs2/file.c
fs/ocfs2/file.c
+1
-1
No files found.
fs/ocfs2/file.c
View file @
9ce5a232
...
@@ -2408,7 +2408,6 @@ static ssize_t ocfs2_file_write_iter(struct kiocb *iocb,
...
@@ -2408,7 +2408,6 @@ static ssize_t ocfs2_file_write_iter(struct kiocb *iocb,
goto
out_dio
;
goto
out_dio
;
}
}
iocb
->
ki_pos
=
*
ppos
+
written_buffered
;
/* We need to ensure that the page cache pages are written to
/* We need to ensure that the page cache pages are written to
* disk and invalidated to preserve the expected O_DIRECT
* disk and invalidated to preserve the expected O_DIRECT
* semantics.
* semantics.
...
@@ -2417,6 +2416,7 @@ static ssize_t ocfs2_file_write_iter(struct kiocb *iocb,
...
@@ -2417,6 +2416,7 @@ static ssize_t ocfs2_file_write_iter(struct kiocb *iocb,
ret
=
filemap_write_and_wait_range
(
file
->
f_mapping
,
*
ppos
,
ret
=
filemap_write_and_wait_range
(
file
->
f_mapping
,
*
ppos
,
endbyte
);
endbyte
);
if
(
ret
==
0
)
{
if
(
ret
==
0
)
{
iocb
->
ki_pos
=
*
ppos
+
written_buffered
;
written
+=
written_buffered
;
written
+=
written_buffered
;
invalidate_mapping_pages
(
mapping
,
invalidate_mapping_pages
(
mapping
,
*
ppos
>>
PAGE_CACHE_SHIFT
,
*
ppos
>>
PAGE_CACHE_SHIFT
,
...
...
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