diff options
author | Suresh Jayaraman <sjayaraman@suse.de> | 2010-07-05 14:43:11 +0200 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2010-08-02 14:40:37 +0200 |
commit | 9dc06558c223bbc08290917ac44c25963bc09e43 (patch) | |
tree | 7ffd7618faaa251c286637815db5f91d2d410467 /fs/cifs/fscache.c | |
parent | cifs: FS-Cache page management (diff) | |
download | linux-9dc06558c223bbc08290917ac44c25963bc09e43.tar.xz linux-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/fscache.c')
-rw-r--r-- | fs/cifs/fscache.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/fs/cifs/fscache.c b/fs/cifs/fscache.c index 5dd935280049..3b1636704c85 100644 --- a/fs/cifs/fscache.c +++ b/fs/cifs/fscache.c @@ -140,6 +140,17 @@ int cifs_fscache_release_page(struct page *page, gfp_t gfp) return 1; } +void __cifs_readpage_to_fscache(struct inode *inode, struct page *page) +{ + int ret; + + cFYI(1, "CIFS: readpage_to_fscache(fsc: %p, p: %p, i: %p", + CIFS_I(inode)->fscache, page, inode); + ret = fscache_write_page(CIFS_I(inode)->fscache, page, GFP_KERNEL); + if (ret != 0) + fscache_uncache_page(CIFS_I(inode)->fscache, page); +} + void __cifs_fscache_invalidate_page(struct page *page, struct inode *inode) { struct cifsInodeInfo *cifsi = CIFS_I(inode); |