[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>
This commit is contained in:
Jens Axboe 2006-05-01 19:59:54 +02:00
parent 7f9c51f0d9
commit e27dedd84c
1 changed files with 6 additions and 0 deletions

View File

@ -301,6 +301,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.
*/