From: Jens Axboe Date: Thu, 27 Apr 2006 06:44:27 +0000 (+0200) Subject: [PATCH] splice: switch to using page_cache_readahead() X-Git-Tag: v2.6.17-rc4~140^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=eb645a24de82496434cc81171d7f350edb327399;p=platform%2Fkernel%2Flinux-3.10.git [PATCH] splice: switch to using page_cache_readahead() Avoids doing useless work, when the file is fully cached. Signed-off-by: Jens Axboe --- diff --git a/fs/splice.c b/fs/splice.c index 447ebc0..dc205f6 100644 --- a/fs/splice.c +++ b/fs/splice.c @@ -299,8 +299,8 @@ __generic_file_splice_read(struct file *in, loff_t *ppos, * read-ahead if this is a non-zero offset (we are likely doing small * chunk splice and the page is already there) for a single page. */ - if (!loff || spd.nr_pages > 1) - do_page_cache_readahead(mapping, in, index, spd.nr_pages); + if (!loff || nr_pages > 1) + page_cache_readahead(mapping, &in->f_ra, in, index, nr_pages); /* * Now fill in the holes: