- /*
- * Get as many pages from the page cache as possible..
- * Start IO on the page cache entries we create (we
- * can assume that any pre-existing ones we find have
- * already had IO started on them).
- */
- i = find_get_pages(mapping, index, nr_pages, pages);
-
- /*
- * common case - we found all pages and they are contiguous,
- * kick them off
- */
- if (i && (pages[i - 1]->index == index + i - 1))
- goto splice_them;
-
- /*
- * fill shadow[] with pages at the right locations, so we only
- * have to fill holes
- */
- memset(shadow, 0, nr_pages * sizeof(struct page *));
- for (j = 0; j < i; j++)
- shadow[pages[j]->index - index] = pages[j];
-