aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/fscache.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/fscache.h')
-rw-r--r--include/linux/fscache.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/linux/fscache.h b/include/linux/fscache.h
index 9584c094d69f..b195c2e1ef6a 100644
--- a/include/linux/fscache.h
+++ b/include/linux/fscache.h
@@ -173,6 +173,8 @@ struct fscache_netfs {
173 * - these are undefined symbols when FS-Cache is not configured and the 173 * - these are undefined symbols when FS-Cache is not configured and the
174 * optimiser takes care of not using them 174 * optimiser takes care of not using them
175 */ 175 */
176extern int __fscache_register_netfs(struct fscache_netfs *);
177extern void __fscache_unregister_netfs(struct fscache_netfs *);
176extern struct fscache_cache_tag *__fscache_lookup_cache_tag(const char *); 178extern struct fscache_cache_tag *__fscache_lookup_cache_tag(const char *);
177extern void __fscache_release_cache_tag(struct fscache_cache_tag *); 179extern void __fscache_release_cache_tag(struct fscache_cache_tag *);
178 180
@@ -188,7 +190,10 @@ extern void __fscache_release_cache_tag(struct fscache_cache_tag *);
188static inline 190static inline
189int fscache_register_netfs(struct fscache_netfs *netfs) 191int fscache_register_netfs(struct fscache_netfs *netfs)
190{ 192{
191 return 0; 193 if (fscache_available())
194 return __fscache_register_netfs(netfs);
195 else
196 return 0;
192} 197}
193 198
194/** 199/**
@@ -205,6 +210,8 @@ int fscache_register_netfs(struct fscache_netfs *netfs)
205static inline 210static inline
206void fscache_unregister_netfs(struct fscache_netfs *netfs) 211void fscache_unregister_netfs(struct fscache_netfs *netfs)
207{ 212{
213 if (fscache_available())
214 __fscache_unregister_netfs(netfs);
208} 215}
209 216
210/** 217/**