Implement ck1 patchset
/mm/filemap.c
blob:0245651388415f0fadd632262d9dac3ae3f46c26 -> blob:5e35c66da3878b111bdac47a5daf5ed39d4068c2
--- mm/filemap.c
+++ mm/filemap.c
@@ -498,8 +498,8 @@ out:
}
EXPORT_SYMBOL(add_to_page_cache_locked);
-int add_to_page_cache_lru(struct page *page, struct address_space *mapping,
- pgoff_t offset, gfp_t gfp_mask)
+int __add_to_page_cache_lru(struct page *page, struct address_space *mapping,
+ pgoff_t offset, gfp_t gfp_mask, int tail)
{
int ret;
@@ -515,12 +515,18 @@ int add_to_page_cache_lru(struct page *p
ret = add_to_page_cache(page, mapping, offset, gfp_mask);
if (ret == 0) {
if (page_is_file_cache(page))
- lru_cache_add_file(page);
+ lru_cache_add_file_tail(page, tail);
else
lru_cache_add_anon(page);
}
return ret;
}
+
+int add_to_page_cache_lru(struct page *page, struct address_space *mapping,
+ pgoff_t offset, gfp_t gfp_mask)
+{
+ return __add_to_page_cache_lru(page, mapping, offset, gfp_mask, 0);
+}
EXPORT_SYMBOL_GPL(add_to_page_cache_lru);
#ifdef CONFIG_NUMA