aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-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 {
* - these are undefined symbols when FS-Cache is not configured and the
* optimiser takes care of not using them
*/
+extern int __fscache_register_netfs(struct fscache_netfs *);
+extern void __fscache_unregister_netfs(struct fscache_netfs *);
extern struct fscache_cache_tag *__fscache_lookup_cache_tag(const char *);
extern void __fscache_release_cache_tag(struct fscache_cache_tag *);
@@ -188,7 +190,10 @@ extern void __fscache_release_cache_tag(struct fscache_cache_tag *);
static inline
int fscache_register_netfs(struct fscache_netfs *netfs)
{
- return 0;
+ if (fscache_available())
+ return __fscache_register_netfs(netfs);
+ else
+ return 0;
}
/**
@@ -205,6 +210,8 @@ int fscache_register_netfs(struct fscache_netfs *netfs)
static inline
void fscache_unregister_netfs(struct fscache_netfs *netfs)
{
+ if (fscache_available())
+ __fscache_unregister_netfs(netfs);
}
/**