Implement ck1 patchset
/mm/filemap.c
blob:dd828ea59dc7e0002e00f87f166940481206b8b1 -> blob:b377d31bd5b83d2d1c90bb7a908fad5420a21135
--- 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