Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
linux-seco-imx
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Jira
Code
Merge requests
12
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Clea OS
bsp
nxp
linux-seco-imx
Commits
8142c184
Commit
8142c184
authored
11 years ago
by
Al Viro
Browse files
Options
Downloads
Patches
Plain Diff
do_shmem_file_read(): call file_read_actor() directly
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
9e8c2af9
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
mm/shmem.c
+3
-3
3 additions, 3 deletions
mm/shmem.c
with
3 additions
and
3 deletions
mm/shmem.c
+
3
−
3
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
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment