Commit b446894a authored by Andrew Morton's avatar Andrew Morton Committed by Jeff Garzik

[PATCH] use find_get_page() in do_generic_mapping_read()

do_generic_mapping_read() has an open-coded version of find_get_page() hidden
inside it.
parent 4a53ada8
......@@ -559,21 +559,12 @@ void do_generic_mapping_read(struct address_space *mapping,
page_cache_readahead(mapping, ra, filp, index);
nr = nr - offset;
/*
* Try to find the data in the page cache..
*/
find_page:
read_lock(&mapping->page_lock);
page = radix_tree_lookup(&mapping->page_tree, index);
if (!page) {
read_unlock(&mapping->page_lock);
handle_ra_miss(mapping,ra);
page = find_get_page(mapping, index);
if (unlikely(page == NULL)) {
handle_ra_miss(mapping, ra);
goto no_cached_page;
}
page_cache_get(page);
read_unlock(&mapping->page_lock);
if (!PageUptodate(page))
goto page_not_up_to_date;
page_ok:
......
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