[PATCH] splice: call handle_ra_miss() on failure to lookup page
authorJens Axboe <axboe@suse.de>
Mon, 1 May 2006 17:59:54 +0000 (19:59 +0200)
committerJens Axboe <axboe@suse.de>
Mon, 1 May 2006 17:59:54 +0000 (19:59 +0200)
Notify the readahead logic of the missing page. Suggested by
Oleg Nesterov.

Signed-off-by: Jens Axboe <axboe@suse.de>
fs/splice.c

index d7538d8..0a69164 100644 (file)
@@ -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);