aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
Diffstat (limited to 'mm')
-rw-r--r--mm/readahead.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/mm/readahead.c b/mm/readahead.c
index 0f142a40984b..4ee52cadab93 100644
--- a/mm/readahead.c
+++ b/mm/readahead.c
@@ -182,14 +182,11 @@ static int read_pages(struct address_space *mapping, struct file *filp,
182 list_del(&page->lru); 182 list_del(&page->lru);
183 if (!add_to_page_cache(page, mapping, 183 if (!add_to_page_cache(page, mapping,
184 page->index, GFP_KERNEL)) { 184 page->index, GFP_KERNEL)) {
185 ret = mapping->a_ops->readpage(filp, page); 185 mapping->a_ops->readpage(filp, page);
186 if (ret != AOP_TRUNCATED_PAGE) { 186 if (!pagevec_add(&lru_pvec, page))
187 if (!pagevec_add(&lru_pvec, page)) 187 __pagevec_lru_add(&lru_pvec);
188 __pagevec_lru_add(&lru_pvec); 188 } else
189 continue; 189 page_cache_release(page);
190 } /* else fall through to release */
191 }
192 page_cache_release(page);
193 } 190 }
194 pagevec_lru_add(&lru_pvec); 191 pagevec_lru_add(&lru_pvec);
195 ret = 0; 192 ret = 0;