aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/file.c
diff options
context:
space:
mode:
authorSuresh Jayaraman <sjayaraman@suse.de>2010-07-05 18:13:11 +0530
committerSteve French <sfrench@us.ibm.com>2010-08-02 12:40:37 +0000
commit9dc06558c223bbc08290917ac44c25963bc09e43 (patch)
tree7ffd7618faaa251c286637815db5f91d2d410467 /fs/cifs/file.c
parentcifs: FS-Cache page management (diff)
downloadlinux-dev-9dc06558c223bbc08290917ac44c25963bc09e43.tar.xz
linux-dev-9dc06558c223bbc08290917ac44c25963bc09e43.zip
cifs: store pages into local cache
Store pages from an CIFS inode into the data storage object associated with that inode. Signed-off-by: Suresh Jayaraman <sjayaraman@suse.de> Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/file.c')
-rw-r--r--fs/cifs/file.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/cifs/file.c b/fs/cifs/file.c
index f677ede766d1..ff726c86b290 100644
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
@@ -1944,6 +1944,9 @@ static void cifs_copy_cache_pages(struct address_space *mapping,
SetPageUptodate(page);
unlock_page(page);
data += PAGE_CACHE_SIZE;
+
+ /* add page to FS-Cache */
+ cifs_readpage_to_fscache(mapping->host, page);
}
return;
}
@@ -2113,6 +2116,10 @@ static int cifs_readpage_worker(struct file *file, struct page *page,
flush_dcache_page(page);
SetPageUptodate(page);
+
+ /* send this page to the cache */
+ cifs_readpage_to_fscache(file->f_path.dentry->d_inode, page);
+
rc = 0;
io_error: