Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Bricked
flo
Commits
82aa5d61
Commit
82aa5d61
authored
19 years ago
by
Jens Axboe
Browse files
Options
Download
Email Patches
Plain Diff
[PATCH] splice: fix smaller sized splice reads
Signed-off-by:
Jens Axboe
<
axboe@suse.de
>
parent
a0aa7f68
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
fs/splice.c
fs/splice.c
+12
-1
No files found.
fs/splice.c
View file @
82aa5d61
...
...
@@ -275,6 +275,15 @@ __generic_file_splice_read(struct file *in, loff_t *ppos,
error
=
0
;
bytes
=
0
;
for
(
i
=
0
;
i
<
nr_pages
;
i
++
,
index
++
)
{
unsigned
int
this_len
;
if
(
!
len
)
break
;
/*
* this_len is the max we'll use from this page
*/
this_len
=
min
(
len
,
PAGE_CACHE_SIZE
-
loff
);
find_page:
/*
* lookup the page for this index
...
...
@@ -366,11 +375,13 @@ readpage:
* force quit after adding this page
*/
nr_pages
=
i
;
this_len
=
min
(
this_len
,
loff
);
}
}
fill_it:
pages
[
i
]
=
page
;
bytes
+=
PAGE_CACHE_SIZE
-
loff
;
bytes
+=
this_len
;
len
-=
this_len
;
loff
=
0
;
}
...
...
This diff is collapsed.
Click to expand it.
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