diff options
author | David Howells <dhowells@redhat.com> | 2009-04-03 16:42:45 +0100 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2009-04-03 16:42:45 +0100 |
commit | 7f8e05f60c87646e12c761fef61dd71a7e67112e (patch) | |
tree | f33bfcd5b4662a48890e8245362b381437be76fb /fs/nfs/read.c | |
parent | 9a9fc1c03315f1606596e55b4096d39e2079a041 (diff) | |
download | op-kernel-dev-7f8e05f60c87646e12c761fef61dd71a7e67112e.zip op-kernel-dev-7f8e05f60c87646e12c761fef61dd71a7e67112e.tar.gz |
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.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/nfs/read.c b/fs/nfs/read.c index e18ba79..4ace3c5 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, static void nfs_readpage_release(struct nfs_page *req) { + struct inode *d_inode = req->wb_context->path.dentry->d_inode; + + if (PageUptodate(req->wb_page)) + nfs_readpage_to_fscache(d_inode, req->wb_page, 0); + unlock_page(req->wb_page); dprintk("NFS: read done (%s/%Ld %d@%Ld)\n", |