You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
[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>
This commit is contained in:
+2
-2
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user