diff options
Diffstat (limited to 'fs/nfs/fscache.h')
-rw-r--r-- | fs/nfs/fscache.h | 20 |
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 | */ | ||
158 | static 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 | */ | ||
166 | static 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 | */ |
158 | static inline const char *nfs_server_fscache_state(struct nfs_server *server) | 174 | static 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 */ |
167 | static inline int nfs_fscache_register(void) { return 0; } | 182 | static inline int nfs_fscache_register(void) { return 0; } |
168 | static inline void nfs_fscache_unregister(void) {} | 183 | static inline void nfs_fscache_unregister(void) {} |
@@ -205,6 +220,9 @@ static inline int nfs_readpages_from_fscache(struct nfs_open_context *ctx, | |||
205 | static inline void nfs_readpage_to_fscache(struct inode *inode, | 220 | static inline void nfs_readpage_to_fscache(struct inode *inode, |
206 | struct page *page, int sync) {} | 221 | struct page *page, int sync) {} |
207 | 222 | ||
223 | |||
224 | static inline void nfs_fscache_invalidate(struct inode *inode) {} | ||
225 | |||
208 | static inline const char *nfs_server_fscache_state(struct nfs_server *server) | 226 | static inline const char *nfs_server_fscache_state(struct nfs_server *server) |
209 | { | 227 | { |
210 | return "no "; | 228 | return "no "; |