diff options
author | Mel Gorman <mgorman@suse.de> | 2012-07-31 19:45:06 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-31 21:42:47 -0400 |
commit | d56b4ddf7781ef8dd050542781cc7f55673af002 (patch) | |
tree | afda2689b4944e5dc7fd6d4a2b31f901080ca977 /fs/nfs/read.c | |
parent | 5a178119b0fbe37f7dfb602b37df9cc4b1dc9d71 (diff) |
nfs: teach the NFS client how to treat PG_swapcache pages
Replace all relevant occurences of page->index and page->mapping in the
NFS client with the new page_file_index() and page_file_mapping()
functions.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Mel Gorman <mgorman@suse.de>
Acked-by: Rik van Riel <riel@redhat.com>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: David S. Miller <davem@davemloft.net>
Cc: Eric B Munson <emunson@mgebm.net>
Cc: Eric Paris <eparis@redhat.com>
Cc: James Morris <jmorris@namei.org>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Mike Christie <michaelc@cs.wisc.edu>
Cc: Neil Brown <neilb@suse.de>
Cc: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
Cc: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: Xiaotian Feng <dfeng@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/nfs/read.c')
-rw-r--r-- | fs/nfs/read.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/nfs/read.c b/fs/nfs/read.c index 6267b873bbcb..7cb020782687 100644 --- a/fs/nfs/read.c +++ b/fs/nfs/read.c | |||
@@ -522,11 +522,11 @@ static const struct rpc_call_ops nfs_read_common_ops = { | |||
522 | int nfs_readpage(struct file *file, struct page *page) | 522 | int nfs_readpage(struct file *file, struct page *page) |
523 | { | 523 | { |
524 | struct nfs_open_context *ctx; | 524 | struct nfs_open_context *ctx; |
525 | struct inode *inode = page->mapping->host; | 525 | struct inode *inode = page_file_mapping(page)->host; |
526 | int error; | 526 | int error; |
527 | 527 | ||
528 | dprintk("NFS: nfs_readpage (%p %ld@%lu)\n", | 528 | dprintk("NFS: nfs_readpage (%p %ld@%lu)\n", |
529 | page, PAGE_CACHE_SIZE, page->index); | 529 | page, PAGE_CACHE_SIZE, page_file_index(page)); |
530 | nfs_inc_stats(inode, NFSIOS_VFSREADPAGE); | 530 | nfs_inc_stats(inode, NFSIOS_VFSREADPAGE); |
531 | nfs_add_stats(inode, NFSIOS_READPAGES, 1); | 531 | nfs_add_stats(inode, NFSIOS_READPAGES, 1); |
532 | 532 | ||
@@ -580,7 +580,7 @@ static int | |||
580 | readpage_async_filler(void *data, struct page *page) | 580 | readpage_async_filler(void *data, struct page *page) |
581 | { | 581 | { |
582 | struct nfs_readdesc *desc = (struct nfs_readdesc *)data; | 582 | struct nfs_readdesc *desc = (struct nfs_readdesc *)data; |
583 | struct inode *inode = page->mapping->host; | 583 | struct inode *inode = page_file_mapping(page)->host; |
584 | struct nfs_page *new; | 584 | struct nfs_page *new; |
585 | unsigned int len; | 585 | unsigned int len; |
586 | int error; | 586 | int error; |