Skip to main content
Homepage
Explore
Search or go to…
/
Sign in
Explore
Primary navigation
Project
L
linux
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Collapse sidebar
Snippets
Groups
Projects
Show more breadcrumbs
Martyn Welch
linux
Commits
8142c184
Commit
8142c184
authored
Feb 3, 2014
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
Show 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
sign in
to comment