Lines Matching defs:cache
15 #include <linux/fscache-cache.h>
21 * cache.c
26 bool fscache_begin_cache_access(struct fscache_cache *cache, enum fscache_access_trace why);
27 void fscache_end_cache_access(struct fscache_cache *cache, enum fscache_access_trace why);
29 void fscache_put_cache(struct fscache_cache *cache, enum fscache_cache_trace where);
31 static inline enum fscache_cache_state fscache_cache_state(const struct fscache_cache *cache)
33 return smp_load_acquire(&cache->state);
36 static inline bool fscache_cache_is_live(const struct fscache_cache *cache)
38 return fscache_cache_state(cache) == FSCACHE_CACHE_IS_ACTIVE;
41 static inline void fscache_set_cache_state(struct fscache_cache *cache,
44 smp_store_release(&cache->state, new_state);
48 static inline bool fscache_set_cache_state_maybe(struct fscache_cache *cache,
52 return try_cmpxchg_release(&cache->state, &old_state, new_state);