summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorJens Axboe <axboe@suse.de>2006-05-01 19:59:54 +0200
committerJens Axboe <axboe@suse.de>2006-05-01 19:59:54 +0200
commite27dedd84c119e2f7af54fcde3293be5ad812103 (patch)
treeb388be80b04dd3f04c07ec12955e62f8ccb58bbc /fs
parent7f9c51f0d9783c78db5c2aa16806d0c256ac667f (diff)
downloadlinux-3.10-e27dedd84c119e2f7af54fcde3293be5ad812103.tar.gz
linux-3.10-e27dedd84c119e2f7af54fcde3293be5ad812103.tar.bz2
linux-3.10-e27dedd84c119e2f7af54fcde3293be5ad812103.zip
[PATCH] splice: call handle_ra_miss() on failure to lookup page
Notify the readahead logic of the missing page. Suggested by Oleg Nesterov. Signed-off-by: Jens Axboe <axboe@suse.de>
Diffstat (limited to 'fs')
-rw-r--r--fs/splice.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/splice.c b/fs/splice.c
index d7538d83c36..0a6916423e7 100644
--- a/fs/splice.c
+++ b/fs/splice.c
@@ -302,6 +302,12 @@ __generic_file_splice_read(struct file *in, loff_t *ppos,
page = find_get_page(mapping, index);
if (!page) {
/*
+ * Make sure the read-ahead engine is notified
+ * about this failure.
+ */
+ handle_ra_miss(mapping, &in->f_ra, index);
+
+ /*
* page didn't exist, allocate one.
*/
page = page_cache_alloc_cold(mapping);