aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/read.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2009-04-03 11:42:45 -0400
committerDavid Howells <dhowells@redhat.com>2009-04-03 11:42:45 -0400
commit7f8e05f60c87646e12c761fef61dd71a7e67112e (patch)
treef33bfcd5b4662a48890e8245362b381437be76fb /fs/nfs/read.c
parent9a9fc1c03315f1606596e55b4096d39e2079a041 (diff)
NFS: Store pages from an NFS inode into a local cache
Store pages from an NFS inode into the cache data storage object associated with that inode. Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Steve Dickson <steved@redhat.com> Acked-by: Trond Myklebust <Trond.Myklebust@netapp.com> Acked-by: Al Viro <viro@zeniv.linux.org.uk> Tested-by: Daire Byrne <Daire.Byrne@framestore.com>
Diffstat (limited to 'fs/nfs/read.c')
-rw-r--r--fs/nfs/read.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/nfs/read.c b/fs/nfs/read.c
index e18ba792872f..4ace3c50a8eb 100644
--- a/fs/nfs/read.c
+++ b/fs/nfs/read.c
@@ -140,6 +140,11 @@ int nfs_readpage_async(struct nfs_open_context *ctx, struct inode *inode,
140 140
141static void nfs_readpage_release(struct nfs_page *req) 141static void nfs_readpage_release(struct nfs_page *req)
142{ 142{
143 struct inode *d_inode = req->wb_context->path.dentry->d_inode;
144
145 if (PageUptodate(req->wb_page))
146 nfs_readpage_to_fscache(d_inode, req->wb_page, 0);
147
143 unlock_page(req->wb_page); 148 unlock_page(req->wb_page);
144 149
145 dprintk("NFS: read done (%s/%Ld %d@%Ld)\n", 150 dprintk("NFS: read done (%s/%Ld %d@%Ld)\n",