Commit e27dedd8 authored by Jens Axboe's avatar Jens Axboe

[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: default avatarJens Axboe <axboe@suse.de>
parent 7f9c51f0
...@@ -301,6 +301,12 @@ __generic_file_splice_read(struct file *in, loff_t *ppos, ...@@ -301,6 +301,12 @@ __generic_file_splice_read(struct file *in, loff_t *ppos,
*/ */
page = find_get_page(mapping, index); page = find_get_page(mapping, index);
if (!page) { 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 didn't exist, allocate one.
*/ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment