ceph: use __page_cache_alloc and add_to_page_cache_lru

Following Nick Piggin patches in btrfs, pagecache pages should be
allocated with __page_cache_alloc, so they obey pagecache memory
policies.

Also, using add_to_page_cache_lru instead of using a private
pagevec where applicable.

Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
Signed-off-by: Sage Weil <sage@newdream.net>
This commit is contained in:
Yehuda Sadeh
2010-03-17 13:54:02 -07:00
committed by Sage Weil
parent f553069e5d
commit 31459fe4b2
5 changed files with 6 additions and 11 deletions

View File

@@ -641,7 +641,7 @@ static int ceph_sync_setxattr(struct dentry *dentry, const char *name,
return -ENOMEM;
err = -ENOMEM;
for (i = 0; i < nr_pages; i++) {
pages[i] = alloc_page(GFP_NOFS);
pages[i] = __page_cache_alloc(GFP_NOFS);
if (!pages[i]) {
nr_pages = i;
goto out;