aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/fscache.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfs/fscache.h')
-rw-r--r--fs/nfs/fscache.h20
1 files changed, 19 insertions, 1 deletions
diff --git a/fs/nfs/fscache.h b/fs/nfs/fscache.h
index c5b11b53ff33..277b02782897 100644
--- a/fs/nfs/fscache.h
+++ b/fs/nfs/fscache.h
@@ -153,6 +153,22 @@ static inline void nfs_readpage_to_fscache(struct inode *inode,
153} 153}
154 154
155/* 155/*
156 * Invalidate the contents of fscache for this inode. This will not sleep.
157 */
158static inline void nfs_fscache_invalidate(struct inode *inode)
159{
160 fscache_invalidate(NFS_I(inode)->fscache);
161}
162
163/*
164 * Wait for an object to finish being invalidated.
165 */
166static inline void nfs_fscache_wait_on_invalidate(struct inode *inode)
167{
168 fscache_wait_on_invalidate(NFS_I(inode)->fscache);
169}
170
171/*
156 * indicate the client caching state as readable text 172 * indicate the client caching state as readable text
157 */ 173 */
158static inline const char *nfs_server_fscache_state(struct nfs_server *server) 174static inline const char *nfs_server_fscache_state(struct nfs_server *server)
@@ -162,7 +178,6 @@ static inline const char *nfs_server_fscache_state(struct nfs_server *server)
162 return "no "; 178 return "no ";
163} 179}
164 180
165
166#else /* CONFIG_NFS_FSCACHE */ 181#else /* CONFIG_NFS_FSCACHE */
167static inline int nfs_fscache_register(void) { return 0; } 182static inline int nfs_fscache_register(void) { return 0; }
168static inline void nfs_fscache_unregister(void) {} 183static inline void nfs_fscache_unregister(void) {}
@@ -205,6 +220,9 @@ static inline int nfs_readpages_from_fscache(struct nfs_open_context *ctx,
205static inline void nfs_readpage_to_fscache(struct inode *inode, 220static inline void nfs_readpage_to_fscache(struct inode *inode,
206 struct page *page, int sync) {} 221 struct page *page, int sync) {}
207 222
223
224static inline void nfs_fscache_invalidate(struct inode *inode) {}
225
208static inline const char *nfs_server_fscache_state(struct nfs_server *server) 226static inline const char *nfs_server_fscache_state(struct nfs_server *server)
209{ 227{
210 return "no "; 228 return "no ";