aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
authorMel Gorman <mgorman@suse.de>2013-07-03 18:02:32 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-07-03 19:07:31 -0400
commita0b8cab3b9b2efadabdcff264c450ca515e2619c (patch)
tree31bcd78c027cafbc9daf892fe7b6db07c48297a5 /fs/nfs
parent059285a25f30c13ed4f5d91cecd6094b9b20bb7b (diff)
mm: remove lru parameter from __pagevec_lru_add and remove parts of pagevec API
Now that the LRU to add a page to is decided at LRU-add time, remove the misleading lru parameter from __pagevec_lru_add. A consequence of this is that the pagevec_lru_add_file, pagevec_lru_add_anon and similar helpers are misleading as the caller no longer has direct control over what LRU the page is added to. Unused helpers are removed by this patch and existing users of pagevec_lru_add_file() are converted to use lru_cache_add_file() directly and use the per-cpu pagevecs instead of creating their own pagevec. Signed-off-by: Mel Gorman <mgorman@suse.de> Reviewed-by: Jan Kara <jack@suse.cz> Reviewed-by: Rik van Riel <riel@redhat.com> Acked-by: Johannes Weiner <hannes@cmpxchg.org> Cc: Alexey Lyahkov <alexey.lyashkov@gmail.com> Cc: Andrew Perepechko <anserper@ya.ru> Cc: Robin Dong <sanbai@taobao.com> Cc: Theodore Tso <tytso@mit.edu> Cc: Hugh Dickins <hughd@google.com> Cc: Rik van Riel <riel@redhat.com> Cc: Bernd Schubert <bernd.schubert@fastmail.fm> Cc: David Howells <dhowells@redhat.com> Cc: Trond Myklebust <Trond.Myklebust@netapp.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/dir.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index 5d051419527b..d7ed697133f0 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -33,6 +33,7 @@
33#include <linux/pagevec.h> 33#include <linux/pagevec.h>
34#include <linux/namei.h> 34#include <linux/namei.h>
35#include <linux/mount.h> 35#include <linux/mount.h>
36#include <linux/swap.h>
36#include <linux/sched.h> 37#include <linux/sched.h>
37#include <linux/kmemleak.h> 38#include <linux/kmemleak.h>
38#include <linux/xattr.h> 39#include <linux/xattr.h>
@@ -1758,7 +1759,6 @@ EXPORT_SYMBOL_GPL(nfs_unlink);
1758 */ 1759 */
1759int nfs_symlink(struct inode *dir, struct dentry *dentry, const char *symname) 1760int nfs_symlink(struct inode *dir, struct dentry *dentry, const char *symname)
1760{ 1761{
1761 struct pagevec lru_pvec;
1762 struct page *page; 1762 struct page *page;
1763 char *kaddr; 1763 char *kaddr;
1764 struct iattr attr; 1764 struct iattr attr;
@@ -1798,11 +1798,8 @@ int nfs_symlink(struct inode *dir, struct dentry *dentry, const char *symname)
1798 * No big deal if we can't add this page to the page cache here. 1798 * No big deal if we can't add this page to the page cache here.
1799 * READLINK will get the missing page from the server if needed. 1799 * READLINK will get the missing page from the server if needed.
1800 */ 1800 */
1801 pagevec_init(&lru_pvec, 0); 1801 if (!add_to_page_cache_lru(page, dentry->d_inode->i_mapping, 0,
1802 if (!add_to_page_cache(page, dentry->d_inode->i_mapping, 0,
1803 GFP_KERNEL)) { 1802 GFP_KERNEL)) {
1804 pagevec_add(&lru_pvec, page);
1805 pagevec_lru_add_file(&lru_pvec);
1806 SetPageUptodate(page); 1803 SetPageUptodate(page);
1807 unlock_page(page); 1804 unlock_page(page);
1808 } else 1805 } else