aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorJens Axboe <axboe@suse.de>2006-04-27 02:44:27 -0400
committerJens Axboe <axboe@nelson.home.kernel.dk>2006-04-27 02:59:48 -0400
commiteb645a24de82496434cc81171d7f350edb327399 (patch)
tree1cb104eb1123d42b001290c0480a9ad55af07051 /fs
parent2be4d50295e2b6f62c07b614e1b103e280dddb84 (diff)
[PATCH] splice: switch to using page_cache_readahead()
Avoids doing useless work, when the file is fully cached. Signed-off-by: Jens Axboe <axboe@suse.de>
Diffstat (limited to 'fs')
-rw-r--r--fs/splice.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/splice.c b/fs/splice.c
index 447ebc0a37f3..dc205f643090 100644
--- a/fs/splice.c
+++ b/fs/splice.c
@@ -299,8 +299,8 @@ __generic_file_splice_read(struct file *in, loff_t *ppos,
299 * read-ahead if this is a non-zero offset (we are likely doing small 299 * read-ahead if this is a non-zero offset (we are likely doing small
300 * chunk splice and the page is already there) for a single page. 300 * chunk splice and the page is already there) for a single page.
301 */ 301 */
302 if (!loff || spd.nr_pages > 1) 302 if (!loff || nr_pages > 1)
303 do_page_cache_readahead(mapping, in, index, spd.nr_pages); 303 page_cache_readahead(mapping, &in->f_ra, in, index, nr_pages);
304 304
305 /* 305 /*
306 * Now fill in the holes: 306 * Now fill in the holes: