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
8142c184
Commit
8142c184
authored
Feb 02, 2014
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
do_shmem_file_read(): call file_read_actor() directly
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
9e8c2af9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
mm/shmem.c
mm/shmem.c
+3
-3
No files found.
mm/shmem.c
View file @
8142c184
...
@@ -1462,7 +1462,7 @@ shmem_write_end(struct file *file, struct address_space *mapping,
...
@@ -1462,7 +1462,7 @@ shmem_write_end(struct file *file, struct address_space *mapping,
return
copied
;
return
copied
;
}
}
static
void
do_shmem_file_read
(
struct
file
*
filp
,
loff_t
*
ppos
,
read_descriptor_t
*
desc
,
read_actor_t
actor
)
static
void
do_shmem_file_read
(
struct
file
*
filp
,
loff_t
*
ppos
,
read_descriptor_t
*
desc
)
{
{
struct
inode
*
inode
=
file_inode
(
filp
);
struct
inode
*
inode
=
file_inode
(
filp
);
struct
address_space
*
mapping
=
inode
->
i_mapping
;
struct
address_space
*
mapping
=
inode
->
i_mapping
;
...
@@ -1550,7 +1550,7 @@ static void do_shmem_file_read(struct file *filp, loff_t *ppos, read_descriptor_
...
@@ -1550,7 +1550,7 @@ static void do_shmem_file_read(struct file *filp, loff_t *ppos, read_descriptor_
* "pos" here (the actor routine has to update the user buffer
* "pos" here (the actor routine has to update the user buffer
* pointers and the remaining count).
* pointers and the remaining count).
*/
*/
ret
=
actor
(
desc
,
page
,
offset
,
nr
);
ret
=
file_read_
actor
(
desc
,
page
,
offset
,
nr
);
offset
+=
ret
;
offset
+=
ret
;
index
+=
offset
>>
PAGE_CACHE_SHIFT
;
index
+=
offset
>>
PAGE_CACHE_SHIFT
;
offset
&=
~
PAGE_CACHE_MASK
;
offset
&=
~
PAGE_CACHE_MASK
;
...
@@ -1588,7 +1588,7 @@ static ssize_t shmem_file_aio_read(struct kiocb *iocb,
...
@@ -1588,7 +1588,7 @@ static ssize_t shmem_file_aio_read(struct kiocb *iocb,
if
(
desc
.
count
==
0
)
if
(
desc
.
count
==
0
)
continue
;
continue
;
desc
.
error
=
0
;
desc
.
error
=
0
;
do_shmem_file_read
(
filp
,
ppos
,
&
desc
,
file_read_actor
);
do_shmem_file_read
(
filp
,
ppos
,
&
desc
);
retval
+=
desc
.
written
;
retval
+=
desc
.
written
;
if
(
desc
.
error
)
{
if
(
desc
.
error
)
{
retval
=
retval
?:
desc
.
error
;
retval
=
retval
?:
desc
.
error
;
...
...
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