summaryrefslogtreecommitdiffstats
path: root/fs/cifs/fscache.h
diff options
context:
space:
mode:
authorSuresh Jayaraman <sjayaraman@suse.de>2010-07-05 14:43:11 +0200
committerSteve French <sfrench@us.ibm.com>2010-08-02 14:40:37 +0200
commit9dc06558c223bbc08290917ac44c25963bc09e43 (patch)
tree7ffd7618faaa251c286637815db5f91d2d410467 /fs/cifs/fscache.h
parentcifs: FS-Cache page management (diff)
downloadlinux-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.h')
-rw-r--r--fs/cifs/fscache.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/fs/cifs/fscache.h b/fs/cifs/fscache.h
index 5e18a21eee9d..1a00d70bca97 100644
--- a/fs/cifs/fscache.h
+++ b/fs/cifs/fscache.h
@@ -51,6 +51,8 @@ extern void cifs_fscache_reset_inode_cookie(struct inode *);
extern void __cifs_fscache_invalidate_page(struct page *, struct inode *);
extern int cifs_fscache_release_page(struct page *page, gfp_t gfp);
+extern void __cifs_readpage_to_fscache(struct inode *, struct page *);
+
static inline void cifs_fscache_invalidate_page(struct page *page,
struct inode *inode)
{
@@ -58,6 +60,13 @@ static inline void cifs_fscache_invalidate_page(struct page *page,
__cifs_fscache_invalidate_page(page, inode);
}
+static inline void cifs_readpage_to_fscache(struct inode *inode,
+ struct page *page)
+{
+ if (PageFsCache(page))
+ __cifs_readpage_to_fscache(inode, page);
+}
+
#else /* CONFIG_CIFS_FSCACHE */
static inline int cifs_fscache_register(void) { return 0; }
static inline void cifs_fscache_unregister(void) {}
@@ -81,6 +90,8 @@ static inline void cifs_fscache_release_page(struct page *page, gfp_t gfp)
static inline int cifs_fscache_invalidate_page(struct page *page,
struct inode *) {}
+static inline void cifs_readpage_to_fscache(struct inode *inode,
+ struct page *page) {}
#endif /* CONFIG_CIFS_FSCACHE */