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
3320c60b
Commit
3320c60b
authored
Mar 10, 2014
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dio: take updating ->result into do_direct_IO()
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
71d8e532
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
fs/direct-io.c
fs/direct-io.c
+2
-4
No files found.
fs/direct-io.c
View file @
3320c60b
...
@@ -1003,6 +1003,7 @@ static int do_direct_IO(struct dio *dio, struct dio_submit *sdio,
...
@@ -1003,6 +1003,7 @@ static int do_direct_IO(struct dio *dio, struct dio_submit *sdio,
1
<<
blkbits
);
1
<<
blkbits
);
sdio
->
block_in_file
++
;
sdio
->
block_in_file
++
;
block_in_page
++
;
block_in_page
++
;
dio
->
result
+=
1
<<
blkbits
;
goto
next_block
;
goto
next_block
;
}
}
...
@@ -1044,6 +1045,7 @@ static int do_direct_IO(struct dio *dio, struct dio_submit *sdio,
...
@@ -1044,6 +1045,7 @@ static int do_direct_IO(struct dio *dio, struct dio_submit *sdio,
sdio
->
block_in_file
+=
this_chunk_blocks
;
sdio
->
block_in_file
+=
this_chunk_blocks
;
block_in_page
+=
this_chunk_blocks
;
block_in_page
+=
this_chunk_blocks
;
sdio
->
blocks_available
-=
this_chunk_blocks
;
sdio
->
blocks_available
-=
this_chunk_blocks
;
dio
->
result
+=
this_chunk_blocks
<<
blkbits
;
next_block:
next_block:
BUG_ON
(
sdio
->
block_in_file
>
sdio
->
final_block_in_request
);
BUG_ON
(
sdio
->
block_in_file
>
sdio
->
final_block_in_request
);
if
(
sdio
->
block_in_file
==
sdio
->
final_block_in_request
)
if
(
sdio
->
block_in_file
==
sdio
->
final_block_in_request
)
...
@@ -1271,10 +1273,6 @@ do_blockdev_direct_IO(int rw, struct kiocb *iocb, struct inode *inode,
...
@@ -1271,10 +1273,6 @@ do_blockdev_direct_IO(int rw, struct kiocb *iocb, struct inode *inode,
retval
=
do_direct_IO
(
dio
,
&
sdio
,
&
map_bh
);
retval
=
do_direct_IO
(
dio
,
&
sdio
,
&
map_bh
);
dio
->
result
+=
iter
->
iov
[
seg
].
iov_len
-
((
sdio
.
final_block_in_request
-
sdio
.
block_in_file
)
<<
blkbits
);
if
(
retval
)
{
if
(
retval
)
{
dio_cleanup
(
dio
,
&
sdio
);
dio_cleanup
(
dio
,
&
sdio
);
break
;
break
;
...
...
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